in reply to Sorting an array of records

ikegami already answered your question, but as a comment on style, in this case I think this would be easier to read:

my @sort2 = sort { $a->{ salary } <=> $b->{ salary } } @workers;

the lowliest monk

Replies are listed 'Best First'.
Re^2: Sorting an array of records
by fruitbeeriswrong (Initiate) on Aug 30, 2005 at 18:30 UTC
    Thanks, your code snippet works a treat.