in reply to newbie: DB versus DIR/PAG database files

See the documentation on dbmopen() at http://www.perldoc.com/perl5.8.0/pod/func/dbmopen.html

In particular the part which says

You can control which DBM library you use by loading that library before you call dbmopen():
use DB_File; dbmopen(%NS_Hist, "$ENV{HOME}/.netscape/history.db") or die "Can't open netscape history file: $!";

Might help.



($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print

Replies are listed 'Best First'.
Re: Re: newbie: DB versus DIR/PAG database files
by kleucht (Beadle) on Oct 06, 2003 at 23:37 UTC
    From original submitter:

    Yeah, I guess I need to install DB_File module and use it. Too bad I don't have administrative permissions on this machine. How can I get ahold of an unzipped version of the file "DB_File.pm"? I cannot install WinZip without Admin permissions.

    Kurt

      From original submitter

      Okay, I got DB_File installed using PPM. That worked great. Now without any file there, it creates the "filename.db" file and manipulates it fine. But when I copy my original "filename.db" file into it's place ... the one that was actually created on a Linux machine, it tells me it cannot open the file.

      I've FTP'd it using both BINARY and ASCII, and both give me the same error.

      I've messed with the file permissions and the file it is giving me an error on has the exact same permissions as the file it created successfully, so it cannot be a permission problem.

      Is there a potential disconnect with the Linux created file and the windows perl module? Can the Windows Perl module DB_File open a file that was created on a Linux machine?

      Thanks for any help you can give!
      Kurt (kleucht)

        Maybe it's worth asking a new question, referring to this one? I don't know how much attention this post is going to get compared to a new thread.


        ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print