shawn wilson wrote:
On Apr 10, 2011 4:05 AM, "Sunita Rani Pradhan"<sunita.prad...@altair.com>
wrote:
sysopen(DATA,"list1.txt",O_RDWR|O_TRUNC);
Why not just use open with +< ? I've never seen the benefit of sysopen
unless you're working with a stream. Also, I don't know those options are
compatible with each other.
It is failing with following error : Argument "O_VVW^C" isn't numeric in
sysopen at sysopen.pl line 3.
IIRC the options are numeric (binary?) values that get added up.
Values that get bitwise ANDed together.
Maybe that 'VVW' is the result.
Yes, if the OP doesn't use strict and warnings then O_RDWR and O_TRUNC
are treated by perl as text strings.
If I'm right, this nonsense result is because the
options don't work together.
According to:
perldoc perlopentut
They should work together, but only if the file already exists.
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/