Re: [MacPerl-AnyPerl] testing numericity

2002-07-16 Thread Joel Rees
Keary gave me > Some pointers: > > > if ( scalar @ARGV > 0 ) > > { @testList = @ARGV; > > } > > The use of "scalar" here is superfluous "if" and "==" force a scalar > context. I am aware of that, but I still have trouble keeping track of what contexts do what to which. Still kind of new to perl

Re: [MacPerl-AnyPerl] testing numericity

2002-07-16 Thread Keary Suska
Some pointers: > if ( scalar @ARGV > 0 ) > { @testList = @ARGV; > } The use of "scalar" here is superfluous "if" and "==" force a scalar context. > if ( $level =~ m/^1.*/ ) > { push @testList, @originalTopPagePlusFlack; > } Note that this will match if $level is 10-19, 100+ etc as well. Your o