in reply to perl option to trace execution
There's also a couple of other ways I've always found to be helpful in debugging perl scripts, especially since I mostly work in a web environment.
Setting a scalar (say $debug) to 1 or 0 at function call and having your print functions conditional on $debug being true.
( print "I'm here" if $debug ). Better yet, writing your own debug function that listens to some higher-level variable is also a great way to do it.
I also recommend the very nifty Smart::Comments from CPAN, which allows you to use specially formated # comments based on conditions, printed to the buffer.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl option
by RMGir (Prior) on Jan 06, 2005 at 13:13 UTC |