$ perl -e'print sort { $b <=> $a } qw/0a 0b/' 0a0b $ perl -e'print reverse sort { $a <=> $b } qw/0a 0b/' 0b0a