Debug prints such as yours entail a runtime hit, which is almost always negligible; but they also clutter the code, which often isn't.If you use something like this:
the compiler should optimize it away, which will remove even the small performance hit (or at least relegate it to the one-time compilation of the code).use constant DEBUG => 1; print "Some useful information" if (DEBUG);
In reply to Re^2: Using the Perl Debugger (-d)
by sgifford
in thread Using the Perl Debugger (-d)
by Melly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |