> 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: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
