use Sort::Key::Maker sort_int_str => sub { int $_, $_ }, qw(int str); my @sorted = sort_int_str @old;