in reply to Re: reduce line of code
in thread reduce line of code
I often prefer setting a default, then overwriting with the validated value:
my $cmd = 0; $cmd = $step_no if $step_no =~ /\A\d+\z/;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: reduce line of code
by lima1 (Curate) on Jul 14, 2009 at 08:52 UTC | |
by jeanluca (Deacon) on Jul 14, 2009 at 09:26 UTC |
In Section
Seekers of Perl Wisdom