@$_ = 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;
In reply to Re: simplify sorting of multiple lists
by ccn
in thread simplify sorting of multiple lists
by december
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |