lestrrat has asked for the wisdom of the Perl Monks concerning the following question:
We recently got cracked (ugh), and had the hosting service provider clean install a new OS (RH 7.2). I was to bring back our perl tools. We had perl5.00503 on our previous system, so this was partly a good thing... Now I was able to use a newer version. And so I started out upgrading perl (RH7.2 comes with 5.6.0 ), installing modules etc... Only, we seem to have this problem with our database files.
We have many databases, created by using perl's DB_File. When the upgrade happened and I tried to access the database to check on the data, I kept getting an undef from the result of tie()
So I boiled the problem down to this:
use DB_File; my %db; my $dbref = tie( %db, "DB_File", $filename ) || die $!;
The above dies with a "File exists" error. For the life of me, I don't understand why on earth this doesn't work...
Because of the error message, I tried using different flags for the fourth argument, like O_RDONLY, but that didn't help. I also checked that I have read/write permission....
I'm out of ideas now... any pointers are appreciated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (lestrrat) DB_File woes
by perrin (Chancellor) on Jan 16, 2002 at 23:45 UTC | |
by lestrrat (Deacon) on Jan 17, 2002 at 03:08 UTC | |
by tilly (Archbishop) on Jan 18, 2002 at 04:24 UTC |