Please help: Why does this script not compile? I'm out of ideas :(
my %tmp;
my $tmp = $dbm{$keyouter};
my $LT;
foreach $keyouter(sort keys %dbm) {
foreach $keyinner(keys %{$tmp}) {
If ($tmp{$keyinner} == "LN")
{
$LT = localtime($tmp);
print "$LT\tLast Name = $tmp{$keyinner}\n"; ##<<== near
"print"
}
else
##<<== near "else"
{
print "\t\t\t\t\tCountry = $tmp{$keyinner}\n";
}
}
};
... instead it produces ...
syntax error at clientdata.cgi line 76, near "print"
syntax error at clientdata.cgi line 78, near "else"
Execution of clientdata.cgi aborted due to compilation errors.
Note: The %tmp declaration and $tmp substitution were made to simplify
the nested hash dereferecing (per Gurusamy Sarathy's MLDBM Readme module):
"BUGS/ Adding or altering substructures to a hash value is not
entirely transparent in current perl.
$mldb{key}{subkey}[3] = 'stuff'; # won't work
Instead, that must be written as:
$tmp = $mldb{key}; # retrieve value
$tmp->{subkey}[3] = 'stuff';
$mldb{key} = $tmp; # store value"
All feedback appreciated.
Still stymied // Ed
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]