use strict; use warnings; my @largeArray = ( "this is a test", "this is another test", "that is another test", "test this is another", ); my @searchCriteria = ("another", "test"); my @newArray = @largeArray; foreach my $criteria (@searchCriteria) { @newArray = grep { /$criteria/ } @newArray; die "Nothing Found\n" unless @newArray; } print join "\n",@newArray;