Mar 25, 2004 #1 Crusader2 Technical User Dec 29, 2002 11 EE I have a massive of words...like @massive and a simple $word scalar...how to check if there's a word in that massive which equals @word?
I have a massive of words...like @massive and a simple $word scalar...how to check if there's a word in that massive which equals @word?
Mar 25, 2004 #2 byleth Programmer Feb 27, 2004 70 PT if (grep ({$_ eq $word} @massive)) { print "Found\n"; } else { print "Not found\n"; } but you should probably use a hash... %massive Upvote 0 Downvote
if (grep ({$_ eq $word} @massive)) { print "Found\n"; } else { print "Not found\n"; } but you should probably use a hash... %massive