use Sort::Key::Maker sort_num_str => sub { int($_), $_ }, qw(int str);