in reply to Watch in Debug

You probably want to check out the Perl debugger. man perldebug if you're on a unix-like system; otherwise find "perldebug" in your perl documentation.

Basic idea:

perl -d my_perl_program
You can then set breakpoints, watch expressions (with the W command), trace through the program, and so on. The docs have the details.

Alan