|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re: Will the sorting order of an array used in producing new arrays be retained?by AnomalousMonk (Prior) |
| on Oct 09, 2012 at 22:24 UTC ( #998095=note: print w/ replies, xml ) | Need Help?? |
|
For question 1: In general, WRT grep (which can only remove elements): yes, the relative order is maintained. For Far More Than You Ever Wanted to Know about this, see the recent Order in which grep/map receive elements. For question 2: In general, WRT map (which is allowed to insert elements) the answer is no:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||