in reply to Fcntl constants missing

I modified your code a bit:

use warnings; use strict; use Fcntl; my $SYSOPEN_MODE = O_WRONLY|O_CREAT; if(exists $Fcntl::{'O_NONBLOCK'}) { print "Exists\n"; $SYSOPEN_MODE |= &{ $Fcntl::{'O_NONBLOCK'} }; }
The output of this is really surprising to me:
Exists Your vendor has not defined Fcntl macro O_NONBLOCK, used at fctest.pl +line 8.
So 'exists' is not a good way to check for the existence of the macro; and it is not the exists expression which printed the error (we were mislead because the line number pointed to the 'if'; or did we just miscount the lines?).

-- 
Ronald Fischer <ynnor@mm.st>