in reply to sorting a list of hashes on an element/attribute of the hash
There are a few ways, but here's one:
@$data = sort { $a->{order} <=> $b->{order} } @$data;
--
print "Just Another Perl Adept\n";
|
---|
In Section
Seekers of Perl Wisdom
in reply to sorting a list of hashes on an element/attribute of the hash
There are a few ways, but here's one:
@$data = sort { $a->{order} <=> $b->{order} } @$data;
--
print "Just Another Perl Adept\n";
|
---|