my @sort; $sort[$_->[2]] = $_ for @masterArray; my @top = map {delete $sort[-1]} 1..3; say Dumper \@top; #### $VAR1 = [ [ 'this', 'that', 300000, 'something', 'else' ], [ 'this', 'that', 125638, 'something', 'else' ], [ 'this', 'that', 12563, 'something', 'else' ] ];