if (@newArray = grep {/another/ and /test/} @largeArray) { print @newArray; }