@list = sort { blah('whatever') } @list; sub blah { my $w = shift; return $a <=> $b; }