in reply to sorting multiple arrays on the criteria of one array
my @data = ( { number => 42, foo => "blah", bar => "hello" }, { number => 67, foo => "red", bar => "green" } ); @data = sort { $a->{number} <=> $b->{number} } @data;
This would sort @data on the number key of each hash, and the foos and bars would go with them.
|
|---|