in reply to Advanced Sorting
I used the following list:@sorted = sort { unless ($a->{'name'} cmp $b->{'name'}) { $a->{age} <=> $b->{age} } } @data;
Which gets sorted to:jim 18 bob 24 bob 14 cathy 98 cathy 45
bob 14 bob 24 cathy 45 cathy 98 jim 18
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Advanced Sorting
by dsdisc (Initiate) on Apr 20, 2000 at 02:07 UTC |