|
|
| go ahead... be a heretic | |
| PerlMonks |
Re: Sorting complex databy sundialsvc4 (Monsignor) |
| on Feb 13, 2013 at 20:18 UTC ( #1018626=note: print w/ replies, xml ) | Need Help?? |
|
To clarify the above ... the sort verb allows a comparison subroutine to be specified. That can be as simple as the “one-liner” in-between (and including) the curly braces, which uses the <=> operator designed expressly for this purpose, or it can be a much more complicated function. Within that function, for your further convenience, the variables $a and $b are magically defined.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||