in reply to Making debug a little more intelligent
my $debug = 2; sub debug { my ($level, $msg) = @_; return if $level > $debug; print DEBUG "LEVEL $level: $msg"; } debug 2, "foo\n" if something; debug 1, "moo\n" if something;
elusion : http://matt.diephouse.com
|
|---|