my @list = map {"E$_"} (1..20); for my $k (sort {substr($a, 1) <=> substr($b, 1)} @list) { print "$k "; }