Hi List,
I am trying to assign key/value pairs to a hash based on whether a variable
from an HTML form has a value or not.
I have the code:
if ($vSalutation)
{
%arr_criteria = ("salutation" => $vSalutation);
print "<TR>\n";
print "<TD><SPAN CLASS=\"menubold\">Salutation:</SPAN></TD>";
print "<TD> $vSalutation </TD>\n";
print "</TR>\n";
}
if ($vNameL)
{
%arr_criteria = ("last_name" => $vNameL);
print "<TR>\n";
print "<TD><SPAN CLASS=\"menubold\">Last Name:</SPAN></TD>";
print "<TD> $vNameL </TD>\n";
print "</TR>\n";
}
The assignment to %arr_criteria is working. However I have not found the
method that will let me add a key/value pair instead of overwriting the
existing one. I always have only 1 hash key afte this code is executed. Can
I assign pairs to a hash on the fly, or do I need to find a different way to
do it?
Help? Please? Thanks.
Brian
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]