in reply to Problems using DB_File on Windows (was: Windows/UNIX)

Howdy perleager,

I think windows perl does not come with DB_File capability. At least when I try to run your script I get this error: Can't locate DB_File.pm in @INC

I tried to pull it down using ppm but no dice.

You might want to look at the perlport page chromatic suggested under the part about standard modules. It suggests you might be able to use AnyDBM_File - which I am not familar with, but which appears to be functioning on my windows perl.

EEjack

Replies are listed 'Best First'.
Re: Re: Windows/UNIX
by LD2 (Curate) on Apr 21, 2001 at 08:46 UTC
    eejack is correct, DB_File is mainly for Unix platforms.

    I'm guessing that is your main problem: use DB_File;. But, there are binaries out there in which include DB_File for a Win32 distribution by Gurusamy Sarathy. You can ftp the files here. Hope this helps a bit.
Re (tilly) 2: Windows/UNIX
by tilly (Archbishop) on Apr 21, 2001 at 16:02 UTC
    AnyDBM_File will use its preference for a dbm. It will always find something though because it can fall back on SDBM_File which ships with Perl.

    However if keys or values go over 2K, that will cause data corruption. So don't use SDBM_File if you can avoid it.

    Also note that if you are using one dbm and then install another, AnyDBM_File will no longer know how to read any of the data files that you previously worked with. Caveat programmer.