sweepy838 has asked for the wisdom of the Perl Monks concerning the following question:
So i have:
it prints nothing, even though the name is there. however, this works:next unless ( grep( /$name/, @names )); print "$name isnt in the array so continue";
thx for help :)if ( grep( /$name/, @names )) { print "name is in the array"; } #but this doesnt suit my needs.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: next unless - doesnt work?
by brx (Pilgrim) on Apr 28, 2012 at 15:01 UTC | |
by sweepy838 (Acolyte) on Apr 28, 2012 at 15:16 UTC | |
by stevieb (Canon) on Apr 28, 2012 at 15:35 UTC | |
by jeanluca (Deacon) on Apr 28, 2012 at 16:18 UTC | |
by thomas895 (Deacon) on Apr 28, 2012 at 20:49 UTC | |
by eyepopslikeamosquito (Archbishop) on Apr 28, 2012 at 22:10 UTC | |
by ikegami (Patriarch) on Apr 30, 2012 at 19:35 UTC | |
by Anonymous Monk on Apr 28, 2012 at 15:36 UTC | |
by brx (Pilgrim) on Apr 28, 2012 at 15:42 UTC | |
by sweepy838 (Acolyte) on Apr 28, 2012 at 16:17 UTC | |
by ww (Archbishop) on Apr 28, 2012 at 17:13 UTC |
Back to
Seekers of Perl Wisdom