Adam Jimerson wrote:
Yea I read that dbmopen was superseded by the "tie" function but I couldn't
figure out the permissions for it:
tie(%HIST, 'NDBM_File', '/usr/lib/news/history', 1, 0);
perldoc DB_File
[ snip ]
Default Parameters
It is possible to omit some or all of the final 4 parameters in the
call to "tie" and let them take default values. As DB_HASH is the
most common file format used, the call:
tie %A, "DB_File", "filename" ;
is equivalent to:
tie %A, "DB_File", "filename", O_CREAT|O_RDWR, 0666, $DB_HASH ;
Use the Fcntl module for the O_CREAT and O_RDWR constants.
Which is what I though the 1,0 was there for. A quick question though, any
certain reason why you used DB_File in your code over any of the other
databases?
No. Use any one that suits your needs.
John
--
Those people who think they know everything are a great
annoyance to those of us who do. -- Isaac Asimov
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/