T
Tom
I can write to, close aand reopen a dbm file with hashes of hasjed of hashes
and everything is OK.
Data I write is read back just fine.
However, when I run the program again later on and use the same exact code
to reopen the dbm, al the data is gone.
Here is a snippet of what I am doing:
dbmopen (%nd,$ndbfile,0666) || die "Can't dbmopen $ndbfile: $!";
$stk = "ABC";
$datecode = "20030914";
$druntime = "700";
$data = "12345";
$nd{$stk}{$datecode}{$druntime}{Data} = $data;
dbmclose (%nd) || die "Can't dbmclose $ndbfile: $!";
dbmopen (%nd,$ndbfile,0666) || die "Can't dbmopen $ndbfile: $!";
print "Data: $nd{$stk}{$datecode}{$druntime}{Data}\n";
dbmclose (%nd) || die "Can't dbmclose $ndbfile: $!";
-------
Data: 12345
-------
However, if I rerun the script with just the following, I get this:
$stk = "ABC";
$datecode = "20030914";
$druntime = "700";
$data = "12345";
dbmopen (%nd,$ndbfile,0666) || die "Can't dbmopen $ndbfile: $!";
print "Data: $nd{$stk}{$datecode}{$druntime}{Data}\n";
dbmclose (%nd) || die "Can't dbmclose $ndbfile: $!";
Use of unitialized value in concatenation (.) at C: blah, blah, blah
Date:
Apparently, there is a problem accessing the dbm file, though it is there.
Any help would be greatly appreciated, thanks,
Tom
and everything is OK.
Data I write is read back just fine.
However, when I run the program again later on and use the same exact code
to reopen the dbm, al the data is gone.
Here is a snippet of what I am doing:
dbmopen (%nd,$ndbfile,0666) || die "Can't dbmopen $ndbfile: $!";
$stk = "ABC";
$datecode = "20030914";
$druntime = "700";
$data = "12345";
$nd{$stk}{$datecode}{$druntime}{Data} = $data;
dbmclose (%nd) || die "Can't dbmclose $ndbfile: $!";
dbmopen (%nd,$ndbfile,0666) || die "Can't dbmopen $ndbfile: $!";
print "Data: $nd{$stk}{$datecode}{$druntime}{Data}\n";
dbmclose (%nd) || die "Can't dbmclose $ndbfile: $!";
-------
Data: 12345
-------
However, if I rerun the script with just the following, I get this:
$stk = "ABC";
$datecode = "20030914";
$druntime = "700";
$data = "12345";
dbmopen (%nd,$ndbfile,0666) || die "Can't dbmopen $ndbfile: $!";
print "Data: $nd{$stk}{$datecode}{$druntime}{Data}\n";
dbmclose (%nd) || die "Can't dbmclose $ndbfile: $!";
Use of unitialized value in concatenation (.) at C: blah, blah, blah
Date:
Apparently, there is a problem accessing the dbm file, though it is there.
Any help would be greatly appreciated, thanks,
Tom