"be consistent" | |
PerlMonks |
Sort routineby Anonymous Monk |
on Sep 18, 2002 at 11:38 UTC ( [id://198794]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
hello I have an array like the following:
My array will grow to probably 100 elements, with the time element increasing at random, and I want to sort the array in ascending order based on the time portion.
@event_queue = sort { $a <=> $b } @event_queue; This doesn't seem to work, I'm trying to ignore the Event portion of the array, and sort based on the time portion. Any suggestions?
Back to
Seekers of Perl Wisdom
|
|