Think about Loose Coupling | |
PerlMonks |
Re: How can I sort my array numerically on part of the string? (alias)by LanX (Saint) |
on Dec 02, 2020 at 13:27 UTC ( [id://11124516]=note: print w/replies, xml ) | Need Help?? |
> which has the added detriment of dropping off my animals... maybe it has been mentioned before, but I can't seem to find it. $a and $b are aliases of @list elements so $a=~s/,.+// will alter the original list. That's why tybalt89 added an /r modifier in his solution Actually I can't think of a useful application of aliasing in sort because elements are accessed multiple times in unpredictable ways.
any useful application???
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|