NDBM_File file not found?
From: Greg G (ggershSNACK_at_CAKEctc.net)
Date: 08/18/04
- Next message: DrkShadow: "Windows and long filenames"
- Previous message: Jim Schueler: "Inherited class methods and special variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 18 Aug 2004 15:59:50 -0400
Can someone tell me why the "tie" command here might be failing with a
file not found? The file refered to by $fname is there, and even
putting in an absolute path doesn't change the results.
I'm using ActivePerl 5.8.0 and I got the same results with CPAN 5.8.4 as
well.
Thanks.
#!/usr/local/bin/perl
use Fcntl;
use NDBM_File;
$fname = "20040817";
%dbinfo = ();
$db = tie (%dbinfo, 'NDBM_File', $fname, O_RDONLY, 0);
if (!defined $db) {
die "Can't open \'$fname\': $! \n";
}
while (($key,$val) = each %dbinfo) {
print $key, ' = ', unpack('L',$val), "\n";
}
untie %dbinfo;
-Greg G
- Next message: DrkShadow: "Windows and long filenames"
- Previous message: Jim Schueler: "Inherited class methods and special variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|