I removed beginners-cgi from the Cc: list.  Your question has nothing
specifically to do with CGI, and is thus not appropriate on that list. 
Please don't cross-post.


On Fri, May 03, 2002 at 06:58:34PM +0800, Conan Chai wrote:
> use MLDBM 'DB_File';
> 
> tie %data, "MLDBM", "database", O_CREAT|O_RDWR, 0644
> or die "can't open/create files:$!\n";
> 
> the error:
> MLDBM error: Second level tie failed, "No such file or
> directory"

Are you certain that's the only error you got?  Did you, by chance, also see
something like:

    Argument "O_SVWST" isn't numeric in subroutine entry at
    /usr/lib/perl/5.6.1/DB_File.pm line 263.

What I'm getting at is that you may not have imported the O_CREAT and O_RDWR
constants, so they're being evaluated as strings.  Assuming the code you
showed us is all of the code you're using, this is the case, and you need to
add something like:

    use Fcntl qw(O_RDWR O_CREAT);

or

    use DB_File qw(O_RDWR O_CREAT);

Depending on whether or not you want to load an extra module for these
constants.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to