in reply to Sorting an array of hashes
Would be nice if you showed us the code you've tried so we can explain where your misunderstandings are.
But this will do what you want.
@job_data = sort { $a->{runs} cmp $b->{runs} } @job_data;
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sorting an array of hashes
by Scarborough (Hermit) on Jul 28, 2004 at 08:58 UTC |