in reply to simplify sorting of multiple lists

@$_ = sort {$a cmp $b} @$_ for \@list1, \@list2;

you can use map of course, but it's a bad style see perldoc perlstyle

map {@$_ = sort {$a cmp $b} @$_} \@list1, \@list2;

Replies are listed 'Best First'.
Re^2: simplify sorting of multiple lists
by december (Pilgrim) on Jul 20, 2004 at 17:06 UTC
    Ah, thanks for your solution. I was -quite unsuccesfully- trying to use the return value of 'map', so I think the bad style rule doesn't count then. I think the flattening effect of map's return values is what got me stuck. I will use the for-notion, I think. It's quite easy to understand on first sight.