Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > NDBM_File file not found?

Thread Tools

NDBM_File file not found?

Greg G
Posts: n/a

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



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

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting JPG file ppt file [Powerpoint] file zxcvar Digital Photography 7 06-22-2009 07:54 PM
How to create MDF file (.mdf) file from XML file. Dave ASP .Net 1 06-07-2007 11:32 PM
In file parsing, taking the first few characters of a text file after a readfile or streamreader file read... .Net Sports ASP .Net 11 01-17-2006 12:44 AM
An Automated process of watching a network file folder, reading a file in it and deleting the file using ASP.NET ? Luis Esteban Valencia Muņoz ASP .Net 3 06-04-2005 10:56 AM
Can not delete file: Can not read from source file or disk. Pundit Computer Support 0 02-28-2005 03:27 AM