in reply to sorting array of arrays reference
Trading space for time (note that delete() on an array is deprecated):
my @sort; $sort[$_->[2]] = $_ for @masterArray; my @top = map {delete $sort[-1]} 1..3; say Dumper \@top;
Output:
$VAR1 = [ [ 'this', 'that', 300000, 'something', 'else' ], [ 'this', 'that', 125638, 'something', 'else' ], [ 'this', 'that', 12563, 'something', 'else' ] ];
|
|---|