Schwartzian Transformの 動作を調べる use Data::Dumper; $Data::Dumper::Indent = 0; @data = qw(A10 F4 F16 X29 F18 F15 B29 C130); print "data: ", Dumper(\@data), "\n"; @tmp1 = map { [$_, split(/(\d+)/, $_)] } @data; print "tmp1: ", Dumper(\@tmp1), "\n"; @tmp2 = sort { $a->[1] cmp $b->[1] || $a->[2] <=> $b->[2] } @tmp1; print "tmp2: ", Dumper(\@tmp2), "\n"; @ret = map { $_->[0] } @tmp2; print "ret: ", Dumper(\@ret), "\n"; 実行結果 data: $VAR1 = ['A10','F4','F16', ... tmp1: $VAR1 = [['A10','A',10],['F4','F',4], ... tmp2: $VAR1 = [['A10','A',10],['B29','B',29], ... ret: $VAR1 = ['A10','B29','C130', ...