print for map{ s/\D\K0+//; $_ } sort map{ sprintf "%s%02d", /(\D+)(\d+)/ } qw[ St0 St01 St00009 ];; St St1 St9