When I run a virtual (on free bsd) I receive this error:
virtual ./ccdb1Script2.pl
[Tue Jun 19 15:08:11 2001] ccdb1Script2.pl: Odd number of elements in hash assignment at ./ccdb1Script2.pl line 20.
Line twenty initializes my hash:
%postInputs = readPostInputs;
sub readPostInput{
$countyName = $postInputs{'countyName'};
$state = $postInputs{'state'};
$pAddress1 = $postInputs{'pAddress1'};
$pAddress2 = $postInputs{'pAddress2'};
$city = $postInputs{'city'};
$zip = $postInputs{'zip'};
$sAddress1 = $postInputs{'sAddress1' };
$sAddress2 = $postInputs{'sAddress2'};
$genInfoPhone = $postInputs{'genInfoPhone'};
$url = $postInputs{'url'};
$countyURL = $postInputs{'countyURL'};
$recOnLine = $postInputs{'recOnLine'};
$time = $postInputs{'time'};
$dbh->do("INSERT INTO county
VALUES($countyName, $state, $pAddress1, $pAddress2, $city,
$zip, $sAddress1, $sAddress2, $genInfoPhone, $url, $countyURL, $recOnLine, $time)"
;
$dbh->disconnect;
my (%searchField, $name, $buf, $pair, @pairs);
if ($ENV{'REQUEST_METHOD'} eq 'POST'){
read(STDIN, $buf, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buf);
foreach $pair(@pairs)
{
($name, $val) = split(/=/,$pair);
$val = ~ tr/+/ /;
$val = ~ s/%([\a-fA-f0-9][\a-fA-F0-9])/pack("C", hex($1))/eg;
$name = ~ tr/+/ /;
$name = ~ s/%([\a-fA-f0-9][\a-fA-F0-9])/pack("C", hex($1))/eg;
$searchField{$name} = $val;
}
return (%searchField);
}
}
Do you see what I may be doing to cause this error? I have three separate books I am using, and they all give me bits and pieces but not the whole picture.
Thanks
virtual ./ccdb1Script2.pl
[Tue Jun 19 15:08:11 2001] ccdb1Script2.pl: Odd number of elements in hash assignment at ./ccdb1Script2.pl line 20.
Line twenty initializes my hash:
%postInputs = readPostInputs;
sub readPostInput{
$countyName = $postInputs{'countyName'};
$state = $postInputs{'state'};
$pAddress1 = $postInputs{'pAddress1'};
$pAddress2 = $postInputs{'pAddress2'};
$city = $postInputs{'city'};
$zip = $postInputs{'zip'};
$sAddress1 = $postInputs{'sAddress1' };
$sAddress2 = $postInputs{'sAddress2'};
$genInfoPhone = $postInputs{'genInfoPhone'};
$url = $postInputs{'url'};
$countyURL = $postInputs{'countyURL'};
$recOnLine = $postInputs{'recOnLine'};
$time = $postInputs{'time'};
$dbh->do("INSERT INTO county
VALUES($countyName, $state, $pAddress1, $pAddress2, $city,
$zip, $sAddress1, $sAddress2, $genInfoPhone, $url, $countyURL, $recOnLine, $time)"
$dbh->disconnect;
my (%searchField, $name, $buf, $pair, @pairs);
if ($ENV{'REQUEST_METHOD'} eq 'POST'){
read(STDIN, $buf, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buf);
foreach $pair(@pairs)
{
($name, $val) = split(/=/,$pair);
$val = ~ tr/+/ /;
$val = ~ s/%([\a-fA-f0-9][\a-fA-F0-9])/pack("C", hex($1))/eg;
$name = ~ tr/+/ /;
$name = ~ s/%([\a-fA-f0-9][\a-fA-F0-9])/pack("C", hex($1))/eg;
$searchField{$name} = $val;
}
return (%searchField);
}
}
Do you see what I may be doing to cause this error? I have three separate books I am using, and they all give me bits and pieces but not the whole picture.
Thanks