coldfingertips has asked for the wisdom of the Perl Monks concerning the following question:
if ($var1 && $var2) { #if they are present if ((exists $hash{$var1}) && ($hash{$var1}=$var2) { # if it exists in +hash check to see if key has the right value print "Yup, they work" } else { print "Either it didn't exist or crudentials weren't matched"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Existing in hash
by bart (Canon) on Apr 28, 2003 at 09:46 UTC | |
|
Re: Existing in hash
by TVSET (Chaplain) on Apr 28, 2003 at 07:31 UTC | |
by bart (Canon) on Apr 28, 2003 at 09:50 UTC | |
by halley (Prior) on Apr 28, 2003 at 12:02 UTC | |
by bart (Canon) on Apr 28, 2003 at 12:54 UTC |