tie problem

From: Richard (rschurchill_at_freenet.co.uk)
Date: 10/29/03


Date: 29 Oct 2003 09:51:05 -0800

I am writing a script which accesses a DBM file using SDBM. The
program works but throws out a warning of: -

Argument "O_RDWR" isn't numeric in null operation

I've included Fcntl but that doesn't solve the problem. Does anyone
know why this is happening?

Thanks
Richard

use SDBM_File;
use Fcntl;

tie (%DB, 'SDBM_File', "fund.dbm",O_RDWR, 0644) or die "Couldn't find
file\n";

foreach $fund (keys %DB) {
 print $fund;
}

untie %DB;



Relevant Pages

  • SDBM_File Error: Argument "O_RDWR" isnt numeric in null operation
    ... I am writing a script which accesses a DBM file using SDBM. ... program works but throws out a warning of: ... I've included Fcntl but that doesn't solve the problem. ...
    (comp.lang.perl)
  • Re: tie problem
    ... > I am writing a script which accesses a DBM file using SDBM. ... > I've included Fcntl but that doesn't solve the problem. ...
    (comp.lang.perl.misc)
  • Re: Using fcntl and |= - "Argument .... isnt numeric in bitwise or ..."
    ... You've excerpted my typed-in quote from the Perl Cookbook, ... You aren't even checking the return result from fcntl. ... What I found was that the warning message occurs because the 'use ... non-numeric value assigned to the $flags variable by the first fcntl ...
    (comp.lang.perl.misc)
  • Re: tie problem
    ... "Ben Morrow" wrote in message ... >> I am writing a script which accesses a DBM file using SDBM. ... >> I've included Fcntl but that doesn't solve the problem. ... code inside a package and declaring the modules outside of the package, ...
    (comp.lang.perl.misc)
  • Re: Using fcntl and |= - "Argument .... isnt numeric in bitwise or ..."
    ... I'm stumped - trying to get rid of a warning message with code based on ... F_GETFL Get descriptor status flags, ... So, contrary to the example in perldoc -f fcntl, you need ...
    (comp.lang.perl.misc)