perl -e "@orig=qw(A p B e C r D l);@orig=sort{ord($a)<=>ord($b)}@orig;$#orig=3;print join ' ',@orig" A B C D