in reply to O_RDWR and O_APPEND???
my $CF = new FileHandle "$cntrF", O_RDWR | O_APPEND || die '"cntrF' di +d not open $!\n";
Because of the relatively high precedence of the || operator that expression is interpreted as:
my $CF = new FileHandle $cntrF, ( O_RDWR | O_APPEND || die "'cntrF' di +d not open $!\n" );
You need to either use parentheses:
( my $CF = new FileHandle $cntrF, O_RDWR | O_APPEND ) || die "'cntrF' +did not open $!\n";
Or use the lower precedence "or" operator:
my $CF = new FileHandle $cntrF, O_RDWR | O_APPEND or die "'cntrF' did +not open $!\n";
|
|---|