laziness, impatience, and hubris | |
PerlMonks |
Re: Braino - why is this not working?by duelafn (Parson) |
on Oct 18, 2010 at 22:46 UTC ( [id://866060]=note: print w/replies, xml ) | Need Help?? |
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,
In Section
Seekers of Perl Wisdom
|
|