http://www.perlmonks.org?node_id=967814

sweepy838 has asked for the wisdom of the Perl Monks concerning the following question:

So i have:
next unless ( grep( /$name/, @names )); print "$name isnt in the array so continue";
it prints nothing, even though the name is there. however, this works:
if ( grep( /$name/, @names )) { print "name is in the array"; } #but this doesnt suit my needs.
thx for help :)