http://qs321.pair.com?node_id=11101381


in reply to Sort alphabetically from file

#!/usr/bin/perl # https://perlmonks.org/?node_id=11101345 use strict; use warnings; print sort { $a =~ s/[\s\d]*//r cmp $b =~ s///r } <DATA>; __DATA__ 1 2 3 delta 1 2 3 apricot 1 2 3 charlie 1 2 3 bravo 1 2 3 echo 1 2 3 fox