Perl-Sensitive Sunglasses | |
PerlMonks |
Re: How do you specify which fields to sort by when sorting an array.by chromatic (Archbishop) |
on Jul 14, 2002 at 22:51 UTC ( [id://181660]=note: print w/replies, xml ) | Need Help?? |
There are several examples given in the documentation for sort. The trick is specifying which fields of $a and $b to compare:
I took the liberty of fixing the name of @outputRef (which is not a reference) and pushing each row as an anonymous array. I also use numeric comparisons on the phone numbers.
In Section
Seekers of Perl Wisdom
|
|