Re: dbmopen

2007-08-01 Thread Tom Phoenix
On 8/1/07, Somu <[EMAIL PROTECTED]> wrote: > Cant we use this to store arrays? To what does the word "this" refer? To the dbmopen function, somehow, for that was the whole of the subject line? Or to the code which follows? Or both? > Example: > [EMAIL PROTECTED]; No; that code will evaluate th

Re: dbmopen versus tie

2006-05-06 Thread Alan_C
On Saturday 06 May 2006 02:19, Alan_C wrote: > Hi, > > [EMAIL PROTECTED]:~$ perldoc -f dbmopen > > dbmopen HASH,DBNAME,MASK >[This function has been largely superseded by the "tie" > function.] > > > But it does not say "completely superseded" Even more directl

Re: dbmopen problem - solved

2003-12-11 Thread Joel Newkirk
On Thu, 2003-12-11 at 14:06, drieux wrote: > On Dec 10, 2003, at 11:34 PM, Joel Newkirk wrote: > [..] > > I found my problem - apparently webmin was doing "use GDBM_File;" for > > me, which is why it worked in the webmin module, and since I wasn't > > including either that or the webmin "web-lib.pl

Re: dbmopen problem - solved

2003-12-11 Thread drieux
On Dec 10, 2003, at 11:34 PM, Joel Newkirk wrote: [..] I found my problem - apparently webmin was doing "use GDBM_File;" for me, which is why it worked in the webmin module, and since I wasn't including either that or the webmin "web-lib.pl" it was defaulting to a different DB format, hence the "Fi

Re: dbmopen problem

2003-12-11 Thread Joel Newkirk
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: > >

Re: dbmopen problem

2003-12-11 Thread Joel Newkirk
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

Re: dbmopen problem - solved

2003-12-11 Thread Joel Newkirk
On Wed, 2003-12-10 at 20:58, Joel Newkirk wrote: > On Mon, 2003-12-08 at 01:06, Joel Newkirk wrote: > > Now I'm working on a console command to offer the same functionality > > (only needing to read the rules, not write) using the same dbm. I've > > used precisely the same subroutine as in the w

Re: dbmopen problem

2003-12-10 Thread Robert Brown
Joel Newkirk writes: > Well, I guess I'll reply since nobody else has... Problem is I still > have no clue what's wrong here... :^) > > Surely somebody here can offer a hint? Please? :^) > > j I experienced a very similar problem last week. In fact, it was the reason I joined this mail

Re: dbmopen problem

2003-12-10 Thread drieux
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' with

Re: dbmopen problem

2003-12-10 Thread Owen
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.d

Re: dbmopen problem

2003-12-10 Thread Joel Newkirk
Well, I guess I'll reply since nobody else has... Problem is I still have no clue what's wrong here... :^) Surely somebody here can offer a hint? Please? :^) j On Mon, 2003-12-08 at 01:06, Joel Newkirk wrote: > I've run into a problem. I have been working on a webmin module that, > among oth

Re: dbmopen compatibility from perl 5.6 to 5.8

2003-11-24 Thread Robert Brown
Wiggins d'Anconia writes: > Robert Brown wrote: > > I posted this question once before, a couple of days ago, but never > > really got an answer... > > Not attempting a flame war or anything, and I don't necessarily have a > solution but your original post sounded very ungrateful towards th

Re: dbmopen compatibility from perl 5.6 to 5.8

2003-11-24 Thread Wiggins d'Anconia
Robert Brown wrote: I posted this question once before, a couple of days ago, but never really got an answer... Not attempting a flame war or anything, and I don't necessarily have a solution but your original post sounded very ungrateful towards the Perl development team and maintainers and may

Re: dbmopen replacement in perl 5.8.0

2003-11-21 Thread Robert Brown
Robert Brown writes: > drieux writes: > > the alternative of course is the simpler problem of > > permissions, and that the web-server can not actually > > read the file. Do you have a piece of test code that > > merely opens and reads it? I have a very simple utility -- actually a debug

Re: dbmopen replacement in perl 5.8.0

2003-11-21 Thread Robert Brown
drieux writes: > > On Friday, Nov 21, 2003, at 10:40 US/Pacific, Robert Brown wrote: > [..] > > > > # open the username/password database or create it > > dbmopen(%passwd, $passwd_db, 0600) > > || die "cannot open $passwd_db: $!"; > > > > And here is what gets logged in /var/log/httpd/e

Re: dbmopen replacement in perl 5.8.0

2003-11-21 Thread drieux
On Friday, Nov 21, 2003, at 10:40 US/Pacific, Robert Brown wrote: [..] # open the username/password database or create it dbmopen(%passwd, $passwd_db, 0600) || die "cannot open $passwd_db: $!"; And here is what gets logged in /var/log/httpd/error_log: [Fri Nov 21 12:12:59 2003] [error] [client 1

Re: dbmopen can't open /etc/aliases.db file

2002-09-30 Thread Robin Cragg
: "david" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Friday, September 27, 2002 3:49 PM >Subject: Re: dbmopen can't open /etc/aliases.db file > > > > Bruno Negrao - Perl List wrote: > > > > > Ok david. > > > > >

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread david
Bruno Negrao - Perl List wrote: > Yeah it worked! I simply changed the '/usr/lib/news/history' for > '/etc/aliases' and > the script showed the file contents. > But, why? Why dbmopen didn't work? > > thanks, > Bruno. dbmopen defaults to NDBM so if tie works, chances are that dbmopen should wor

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
CTED]> Sent: Friday, September 27, 2002 3:49 PM Subject: Re: dbmopen can't open /etc/aliases.db file > Bruno Negrao - Perl List wrote: > > > Ok david. > > > > Could you send me a code example of a database file being opened for > > reading with tie? > &

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread david
Bruno Negrao - Perl List wrote: > Ok david. > > Could you send me a code example of a database file being opened for > reading with tie? > > thanks, > bnegrao. use NDBM_File; tie(%HIST, 'NDBM_File', '/usr/lib/news/history', 1, 0); while (($key,$val) = each %HIST) { print $key, ' = ', u

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
Ok david. Could you send me a code example of a database file being opened for reading with tie? thanks, bnegrao. - Original Message - From: "david" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 27, 2002 2:41 PM Subject: Re: dbmopen can'

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread david
Bruno Negrao - Perl List wrote: > Hi Michael, the problem is not with the "undef" value - undef is fine - > if you read the dbmopen's documentation you could see it. > > If I choose a value like "0644" the script still doesn't work. > Bellow, is the output of the execution of the same program,

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
lve this exercise, i'd like to know it the dbmopen() really works with my system files. Thanks for any help, Bruno. - Original Message - From: "nkuipers" <[EMAIL PROTECTED]> To: "Bruno Negrao - Perl List" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
lve this exercise, i'd like to know it the dbmopen() really works with my system files. Thanks for any help, Bruno. - Original Message - From: "nkuipers" <[EMAIL PROTECTED]> To: "Bruno Negrao - Perl List" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]

RE: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread nkuipers
l Message - >From: "Michael Kelly" <[EMAIL PROTECTED]> >To: "Perl Beginners List" <[EMAIL PROTECTED]> >Sent: Friday, September 27, 2002 1:04 AM >Subject: Re: dbmopen can't open /etc/aliases.db file > > >> On Thu, Sep 26, 2002 at 09:

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
quot; <[EMAIL PROTECTED]> To: "Perl Beginners List" <[EMAIL PROTECTED]> Sent: Friday, September 27, 2002 1:04 AM Subject: Re: dbmopen can't open /etc/aliases.db file > On Thu, Sep 26, 2002 at 09:38:18PM -0300, Bruno Negrao - Perl List wrote: > > Hi, > > H

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Michael Kelly
On Thu, Sep 26, 2002 at 09:38:18PM -0300, Bruno Negrao - Perl List wrote: > Hi, Hi Bruno, > I'm triyng to open the /etc/aliases.db file for reading with the dbmopen > function - the result is that I can't open the file for reading, or > something like this. yes, I have permission because I'm roo

RE: dbmopen can't open /etc/aliases.db file

2002-09-26 Thread nkuipers
Why is the third parameter in your dbmopen call undef? The example in perldoc -f dbmopen is almost identical to yours except that it defines that third parm as 0666. If the dbmfile does not already exist, it will be created with permissions specified by that third parm. >= Original Message

Re: dbmopen doesn't work

2002-09-25 Thread Michael Fowler
On Tue, Sep 24, 2002 at 07:49:24PM -0300, Bruno Negrao wrote: > #!/usr/bin/perl -w Where's use strict? > dbmopen(%a,"testdb",0666) || die "couldn't create/access the file $!"; > $a = $b = 0; > until ($a < 20){# create items in the testdb.db file This loop will never run. $a == 0, whic

RE: dbmopen doesn't work

2002-09-25 Thread Jeff AA
> -Original Message- > From: Bruno Negrao [mailto:[EMAIL PROTECTED]] > Sent: 24 September 2002 23:49 > To: [EMAIL PROTECTED] > Subject: dbmopen doesn't work > > > Hi all, > Could someone say to me why this program doesn't run? (it > doesn't print the database values) > > #!/usr/bin/p