Re: Using fcntl and |= - "Argument .... isn't numeric in bitwise or ..."
- From: Ben Morrow <ben@xxxxxxxxxxxx>
- Date: Sat, 29 Sep 2007 06:33:56 +0100
Quoth Jim Cochrane <allergic-to-spam@xxxxxxxxxxxxxxxxxxx>:
I'm stumped - trying to get rid of a warning message with code based on
this example snippet from the "Perl Cookbook" book:
use Fcntl;
$lags = "";
fcntl(HANDLE, F_GETFL, $flags) or die "Couldn't get flags: $!\n";
You need to read you systems fcntl(2) as well as the perldocs; at least
on mine, it says
F_GETFL Get descriptor status flags, as described below (arg is
ignored).
So, contrary to the example in perldoc -f fcntl, you need
my $flags = fcntl(HANDLE, F_GETFL);
Ben
.
- Follow-Ups:
- Re: Using fcntl and |= - "Argument .... isn't numeric in bitwise or ..."
- From: Jim Cochrane
- Re: Using fcntl and |= - "Argument .... isn't numeric in bitwise or ..."
- References:
- Using fcntl and |= - "Argument .... isn't numeric in bitwise or ..."
- From: Jim Cochrane
- Using fcntl and |= - "Argument .... isn't numeric in bitwise or ..."
- Prev by Date: Get unlimited visitors to your website
- Next by Date: [NEWBIE] Trivial?
- Previous by thread: Using fcntl and |= - "Argument .... isn't numeric in bitwise or ..."
- Next by thread: Re: Using fcntl and |= - "Argument .... isn't numeric in bitwise or ..."
- Index(es):
Relevant Pages
|