in reply to natural sort on array of arrays

useSort::Key::Natural qw(natkeysort);
my @sorted = natkeysort { $_->[0] } @matrix;

Replies are listed 'Best First'.
Re^2: natural sort on array of arrays
by duelafn (Parson) on May 11, 2016 at 15:08 UTC

    Excellent! I love Sort::Key, but never noticed it has a natural sort included. Took me a moment to figure out what it was doing in its key maker though — it has a packing algorithm which allows it to sort numbers of arbitrary size (unlike most of the techniques in this thread).

    Good Day,
        Dean