On Wed, 2003-12-10 at 22:07, Owen wrote:
> On Mon, 08 Dec 2003 01:06:04 -0500
> Joel Newkirk <[EMAIL PROTECTED]> wrote:
> 
> > dbmopen (%PLRULES, "/var/szs/rules.dbm", undef) or die $!;
> > I die, with "No such file or directory".
> 
> No idea but;
> 
> I would tend to beleive the "No such file or directory" statement.
> you can do an ls -la /var/szs/rules.dbm ?

Yep, the files are there (actually rules.dbm.dir & rules.dbm.pag, as
created previously with:

dbmopen(%PLRULES "/var/szs/rules.dbm", 0644) or die $!;

I use the precise same command (IE, with the "undef") in the CGI script
with no problems.

> I would have written the "or die $!;" as or die "Can't dbmopen $!\n"; but then maybe 
> you only have one die statement to worry about?
> 
> I have never seen "dbmopen (%PLRULES, "/var/szs/rules.dbm", undef)" normally I see 
>       dbmopen (%PLRULES, "/var/szs/rules.dbm", 0666) or die.....
>       %PLRULES=();

Using undef is supposed to open the file for reading only and fail if
it's not found - '0666' will create a new file if one didn't already
exist, and assign it read+write permissions for all, failing only if it
is unable to create the file(s), 

> The syntax for dbmopen is Arrayname DB_filename mode 
> so I just wonder if undef is a mode?
> 
> 
> -- 
> Owen

j

-- 
"Not all those who wander are lost."  - JRR Tolkien


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to