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
In reply to Re: Braino - why is this not working?
by duelafn
in thread Braino - why is this not working?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |