in reply to perl option to trace execution

You may want to try the Graphical Debugger. It's written in Perl/Tk and has saved my bacon numerous times.

You can watch your variables as your program executes - which is what I assume you wanted to do with the print statements you don't want to liberally sprinkle all across your program. The really nice thing is that you can also contract or expand arrays, hashes and complex data structures so you can see how they're being modified.

Good luck!

Useless trivia: In the 2004 Las Vegas phone book there are approximately 28 pages of ads for massage, but almost 200 for lawyers.