J
John Carroll
I believe this is a seriously newbie question, but I can't find
anything that gives me the correct result. :^)
How do you get the actual string value of a hash value, when the key
is known? I am using the following:
%in is set using the &ReadParse from cgi-lib.pl, with "Password" being
one of the keys, with a value of "test".
$file_password = "test";
$password = $in{"Password"};
print $password; # output is "test"
print $file_password; # output is "test"
if ($password ne $file_password) { # result is true
$incorrect_pw = "true";
}
I know about "each", "keys", and "values", but I can't find anything
in O'Reilly's "Programming Perl 2nd Edition" that shows me how to get
the value of a hash when you know the key using these commands.
If anyone has any ideas, I would appreciate them greatly.
Please send email to (e-mail address removed) with any help. I will also
check back on this list until Friday.
thanks,
john
anything that gives me the correct result. :^)
How do you get the actual string value of a hash value, when the key
is known? I am using the following:
%in is set using the &ReadParse from cgi-lib.pl, with "Password" being
one of the keys, with a value of "test".
$file_password = "test";
$password = $in{"Password"};
print $password; # output is "test"
print $file_password; # output is "test"
if ($password ne $file_password) { # result is true
$incorrect_pw = "true";
}
I know about "each", "keys", and "values", but I can't find anything
in O'Reilly's "Programming Perl 2nd Edition" that shows me how to get
the value of a hash when you know the key using these commands.
If anyone has any ideas, I would appreciate them greatly.
Please send email to (e-mail address removed) with any help. I will also
check back on this list until Friday.
thanks,
john