neuroball has asked for the wisdom of the Perl Monks concerning the following question:
# set debugging switch to default (off) use constant DEBUGGING => 0; # loop foreach argument foreach $_ (@ARGV) { # is argument '-d' or '-D'? if ( /^-d$/i ) { # yup. use 'no warnings;' to suppress 'subroutine redefined' w +arning no warnings; # change debugging switch to ON use constant DEBUGGING => 1; } } ... print "FUNCTION_NAME: Debugging Information\n" if DEBUGGING;
|
|---|