in reply to Creating lists using a hash with the same key/values

The idiom of using hashes as a fast and easy lookup table is a common one in Perl. Hashes are quick, easy to setup and lend themselves well to a boolean-type comparisons like what you're talking about.

The only thing is your example of

%SampleHash ( 'whatever' => 'whatever', 'whoever' => 'whoever', )
is more commonly coded as
%SampleHash ( 'whatever' => 1, 'whoever' => 1, )
...simply because if you ain't gonna be using the values of the hash, there's no reason to make the value any longer than absolutely necessary. Making the value a "1" does the trick, and it doesn't waste memory. Of course, you're probably not likely to have a hash of values that's so big for the memory cost to matter much, but hey, waste not want not. :-)

Gary Blackburn
Trained Killer