in reply to Using IF and OR, I'm sure there is a better way
sub any { my $var = shift; for (@_) { return 1 if $var == $_ } } if (any($var,1..2000)) { print "Var is between 1 and 2000 inclusive\n" + }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using IF and OR, I'm sure there is a better way
by cosmicperl (Chaplain) on Apr 27, 2008 at 18:37 UTC |