http://www.perlmonks.org?node_id=45315


in reply to Re: debugging /logging help
in thread debugging /logging help

why not check your if $verbose value within your subroutine? That way you spend less time sprinkling "if $verbose" throughout your program.. Granted, my method is slightly less effecient, but you could change your sub to:
sub debug_info { return(0) unless $verbose; print join ':', "\n*", @_; print "\n"; return 1; }


-marius