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

Often, when coding scripts, I encounter situations where I need to test to see if a variable matches an item that's stored in a list of values.
if (/$hash{$whatever}/) { do something; }
Assuming I'm thinking correctly so far, my next question has to do with creating the hash value. Is there anything "wrong" with populating a hash with keys and values that are the same? For example:
%SampleHash ( 'whatever' => 'whatever', 'whoever' => 'whoever', )
The idea to use a hash to check if an item can be found in a set, is a good one. What is wrong with your last approach, is that if the string evaluates to false, a simple
if($SampleHash{$string}){ ... }
will fail to see it. The strings that do that, are "" and "0".

I ordinarily use one of the following approaches:

foreach(LIST) { $checked{$_}++; } if($checked{$string}) { ... }
or
@checked{LIST} = (); if(exists $check{$string}) { ... }
but there are more. Use what seems most appropriate at the time.