in reply to perl option to trace execution

Try the perl debugger.

Update: and perldoc perldebug, of course.