in reply to schwartzian transform and sorting on two columns

forget about the Schwartzian transform and use Sort::Key:
use Sort::Key::Maker sn_keysort => qw(str num); my @sortedarry = sn_keysort { (split /\t/)[8, 21] } @foo;