G'day all,
Just a quick question I want to be able to have an if statement check
the keys of a hash for truth or not.
So basically I have the following hash...
#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) {
print "Found $user\n";
else {
print "Sorry no such thing as $user: HAVE A NICE DAY \n";
}
Is this almost correct...
Regards,
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]