in reply to Accessing $a and $b of 'sort' across package boundaries

Sort::Key::Maker can simplify those multikey sortings a lot
use Sort::Key::Maker sort_long_strings_first => sub { length $_, lc $_ }, qw(int -str); foreach (sort_long_strings_first @$raw_hash_keys_ar) { #do_stuff; }