Thank you for your answer.
Following that I tried the following code:
sub par_num { return $a <=> $b } $old[0]{jure} = 1; $old[1]{juge} = 1; $old[2]{pupe} = 3; $old[3]{mupe} = 2; @tri = sort par_num @old; @old = @tri; for $i ( 0 .. $#old ) { print "$i is { "; for $mot ( keys %{ $old[$i] } ) { print "$mot=$old[$i]{$mot} "; } print "}\n"; }
It works well on simple array but not on array of hashes
In reply to Re^2: Array of Hashes and sorting by values
by pandelis
in thread Array of Hashes and sorting by values
by pandelis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |