in reply to Braino - why is this not working?
kcott is right
Your function fails here:
my $ans=grep /^$_$/, @res;Which $_ are you matching $_ against? :)
Also, (not relevant in this example) you should protect metacharacters: /^\Q$_\E$/
Good Day,
Dean
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: meta chars --
by perl-diddler (Chaplain) on Oct 19, 2010 at 04:35 UTC | |
|
Re^2: Braino - why is this not working?
by perl-diddler (Chaplain) on Oct 19, 2010 at 00:58 UTC | |
by Anonymous Monk on Oct 19, 2010 at 01:22 UTC | |
by perl-diddler (Chaplain) on Oct 19, 2010 at 03:35 UTC |