$ perl -le '$a="foo"; my @n = (3,2,1); print for sort {$a<=>$b} @n; print $a' 1 2 3 foo