sub in_list { my $needle = shift || q{}; # or croak, your choice. croak 'expecting haystack' if not @_; return grep m/^$needle$/, @_; } if (in_list($var, qw(A B C))) { ... }
In reply to Re: Using IF and OR, I'm sure there is a better way
by eff_i_g
in thread Using IF and OR, I'm sure there is a better way
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |