Ed Sickafus wrote:
foreach $keyouter(sort keys %dbm) {
foreach $keyinner(keys %{$dbm{$keyouter}}){
If ($dbm{$keyouter}{$keyinner} == "LN")
{
print "localtime($dbm{$keyouter}) \t
Last Name = $dbm{$keyouter}{$keyinner}\n";
} ### <--- Line 69
else
{
print "\t\t\t\t\tCountry = $dbm{$keyouter}{$keyinner}\n";
}
}
^ appears to be an extra brace?
};
...
?? Any ideas why this code will not compile.
Probably the second error is related to the first.
?? Why doesn't, %dbm = (%dbm, %newH); , append %newH to %dbm? It seems to
want to over-write. (Line 44 below.)
%dbm doesn't appear set before that, $dbm does? You should consider
setting the scope of the variables when you first use them rather than
all at the top, and depending on your Perl version you are better off
with 'our' and 'my'.
Thanks much for your considerations. Ed
$dbm = tie %storedH, 'MLDM', 'client.dbm', O_CREAT|O_RDWR, 0640, $DB_HASH
or die "Cannot open file 'client.dbm': $!\n";
%dbm = (%dbm, %newH);
undef $dbm; # <<== Line 44
$dbm and %db fer to different variables.
HTH,
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]