Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a great problem

Status
Not open for further replies.

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?
 

if (grep ({$_ eq $word} @massive)) {
print "Found\n";
} else {

print "Not found\n";
}


but you should probably use a hash... %massive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top