in reply to Flag variables
How about:
Or even:if (grep {$_ eq "foo"} @somearray) { someaction(); }
someaction() if grep {$_ eq "foo"} @somearray;
-Blake
In Section
Seekers of Perl Wisdom