in reply to Re^2: Array of Hashes and sorting by values
in thread Array of Hashes and sorting by values

I guess you need to modify the code in par_num to actually return the number associated with the name, instead of doing a simple numerical comparison of the names.

sub par_num { $a->{ (keys %$a)[0]} <=> $b->{ (keys %$b)[0]} };

... is untested but could do what you need.

Replies are listed 'Best First'.
Re^4: Array of Hashes and sorting by values
by pandelis (Initiate) on Jan 18, 2011 at 07:42 UTC

    Your code works !

    Thank you very much !