Actually ... i would desire this:
use strict; use warnings; my $arg = shift || 'boo'; my @valid = qw( goo moo foo voo doo poo ); print "$arg matches\n" if grep /$arg/, @valid;
But this bring up an annoyance as well, because this mistake will compile and always return true (as long as the array being checked is not empty):
Oops!# wrong way ahead! print "$arg matches\n" if grep $arg, @valid;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re^2: Little annoying mistakes ... of others
by jeffa
in thread Little annoying mistakes ... of others
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |