my @final_result = map { [ (split "\t")[@sorted_cols] ] } @{ $arrayref };