|
|
| We don't bite newbies here... much | |
| PerlMonks |
Grep with AoA [Solved]by davies (Priest) |
| on Aug 27, 2012 at 09:28 UTC ( #989950=perlquestion: print w/ replies, xml ) | Need Help?? |
|
davies has asked for the
wisdom of the Perl Monks concerning the following question:
The following code does what I want:
I would prefer to avoid creating @list2 every time (or an anonymous array/list via some other use of map), but I'm stuck. My instincts tell me that it should be possible, but trial results in nothing but error and Google gives me nothing I find helpful. Is there a way of using grep directly on an AoA? Regards, John Davies Update: Thank you both for working solutions that through their slight differences have taught me more than I was expecting.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||