Another idea for the Lazy.
Open a global filehandle called DEBUG. Whenever you want to print a debug message, print to this filehandle. That way, if you want to silence debugging, you can open it to /dev/null, if you want to log to a file, open it to a file, and if you want to show it on the screen, open it to STDERR.
In reply to Re: debug statements
by Raster Burn
in thread debug statements
by koknat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |