0
MWMartin Witts
The grep command tests each element in the array ary and returns a true or false value (according to the equality operator). If any of the elements in ary compare equal to 'foo', then the grep command will return a true value.
0 Comments
my $foo_exists = grep { $_ eq 'foo' } @ary;