if ( (join " ",@test_array)=~/ $input /o) { print "Hey, there's one of those in there!\n\n"; } else { print "Better luck next time: it's not in there.\n\n"; }