On Thu, Oct 3, 2013 at 11:36 PM, Harry Putnam <rea...@newsguy.com> wrote:

> > Then I sprinkle print statements controlled by this variable throughout
> my program:
> >
> >   print "\$_=$_\n" if $debug;
>

for a touch more flexibility, you can create your own debug levels
my $debug = 10;
...
print "in <> loop: \$_=$_\n"
                if $debug > 8;

just remember to set it to zero (not just:
my $debug;

which set it to undef) when you're done, to avoid warnings.

There are, of course, modules you can use to make this nicer, easier but ...
-- 

a

Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk

Reply via email to