On Wed, 2003-12-10 at 22:11, drieux wrote:
> On Dec 10, 2003, at 5:58 PM, Joel Newkirk wrote:
> [..]
> >> whenever I reach:
> >> dbmopen (%PLRULES, "/var/szs/rules.dbm", undef) or die $!;
> >> I die, with "No such file or directory".
> [..]
> 
> are you sure about that dbmopen() line?
> 
> eg:
> 
>       perldoc -f dbmopen
> 
> seems to suggest that DBNAME shoudl be
> the 'name' without the Suffix,
>       
>       dbmopen (%PLRULES, "/var/szs/rules",0755) or die $!;
> 
> because i'm a bit concerned that your dmbopen is actually
> trying to find the file "/var/szs/rules.dbm.dbm" - depending
> upon the underlying OS it is on.

Underlying OS is Linux, specifically Mandrake 9.2, with perl V5.8.1.  I
named it that way because I was migrating from a textfile named "rules"
that originally held the regex rules.  The actual files used are
"rules.dmb.dir" and "rules.dbm.pag", created when I originally accessed
the nonexistant DBM with:
dbmopen (%PLRULES, "/var/szs/rules.dbm", 0644) or die $!;
and it opens and reads without problems from the webmin CGI, but the
precise dbmopen command that works in the webmin CGI fails in the
console-command version.

> but you might want to actually cross over and
> look at doing a 'tie' - cf
> 
>       perldoc -f tie

I thought that was what 'dbmopen' did for me, in this simplistic case of
'tie'.  This is my first week with Perl, so I've got a way to go
still...

> ciao
> drieux
> 
> ---

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