use Sort::Key::Multi qw(si_keysort); # "si" indicates that the sorting keys # are a string and an integer my @sorted = si_keysort { /^(\D*)(\d*)$/ } @data;