Incredibly, I was subscribed to this thread and I am fighting an oracle migration issue that has the exact same symptom (starting about 5 days ago). I was making all kind of "plan b"s in case I could not figure this out.
I, too am interested in the perl script, or the logic that I could just write a C program to do this.
Thanks again!
Regards..
Note: The subject line quote is from Gomer on "Andy of Mayberry".