Basically I'm attaempting to store some complex perl data structures in a DBM hash flatfile database using the DBM::Deep module from CPAN.
A simplified version of the problem is this. Imagine a script:
#!/usr/bin/perl use strict; use warnings; use DBM::Deep; my $db = new DBM::Deep "db.file"; $db->{hash}->{key}->[0] = 10; print $db->{hash}->{key}->[0]; exit;
Basically, the first time the script runs, the db file is created but the variable isn't printed. It has to be run a second time before the value is allocated to the variable and the print occurs. After the second run it works fine. This may not seem like a problem in the above script but it is a serious problem in the actual script I'm trying to implement which is using incrementing counts and autovivification.
Any suggestions?
Cheers in advance,
tb34
In reply to DBM::Deep Problem by travisbickle34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |