|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re^5: Order in which grep/map receive elementsby greengaroo (Friar) |
| on Oct 05, 2012 at 13:55 UTC ( #997479=note: print w/ replies, xml ) | Need Help?? |
|
BrowserUk is right, don't use a module to do that if you can do it with one line of code! Grep receives Imagine you do this: The elements in @array1 will be in the same order has in @array2, right? Now do this: The elements in @array1 will still be in the same order has in @array2, don't you think? And if you do this: Guess what? The elements will still be in the same order and I just explicitly did what grep do in one line.
There are no stupid questions, but there are a lot of inquisitive idiots.
-- greengaroo
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||