> Having trouble making this work.
>
> my @alarm = ("xyz", "abc");
> my $name = "ab";
> unless (grep {/$name/} @alarm) { # do this }
>
> Since "ab" is contained in the array I want it to NOT 'do this'.  What
> have I got wrong?

 If I set 'my $name = "abc";' it seems to match.  But I want to match
on "ab" as well.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to