in reply to Re: Find the word in Array, Hash, Scalar
in thread Find the word in Array, Hash, Scalar

@hash{keys %hash} really is a bad idea...

What will this do? it will create a list of all the keys in the hash, use that list in a hash slice and return all values.

If you want to get all values of a hash then there is the values function... it is shorter, cleaner and more efficient.

(Another possibilty would ofcourse be to use kapproach's approach, which is probably better)