On Dec 5, Daniel Falkenberg said:
>#Check the following variable in the hash %users to see if it exists or
>not...
>$user = "test";
>
>%users = (
> 'test1' => 'Test',
> 'test2' => 'test Account',
> 'test3' => 'Test',
> 'test4' => 'Test Account'
> );
>
>if (%users{$_} eq $user) {
You want:
if ($users{$_}) { ... }
or perhaps
if (exists $users{$_}) { ... }
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]