#2D-Array of all the data, containg rows and columns @AoA = ; my @SPUsers = ("bill", "Bob", "Mike", "Steve", "mmartin"); my @recordsToDel; my $count = 0; for (my $x = 0; $x <= $#AoA; $x++) { if (grep ( @{ $AoA[$x] } !~ @SPUsers, @AoA )) { $recordsToDel[$count] = @{ $AoA[$x] }; } }