The tough use print, but the smart use something like this bit of Perl:
my debug = 1 ; sub err { my $msg = shift ; print "err: $msg\n" if $debug; }
George suggests an improvement in the comments.
和谐社会???喝血社会!!!
The tough use print, but the smart use something like this bit of Perl:
my debug = 1 ; sub err { my $msg = shift ; print "err: $msg\n" if $debug; }
George suggests an improvement in the comments.
2 Comments:
Suggestion:
print STDERR "err: $msg\n" if $debug;
Good catch. Noted in the post.
Post a Comment « Home