M
Markus Hänchen
Hi,
using
open RESULTS, ">results.txt";
does not delete the contents of the file if the file sits on a server.
However, using print I can overwrite as many characters as I want. For
example, if the content of the file is 'Fred went home.', and I write
(via print) 'Carl' then only the first four characters get replaced
with rest remaining, i.e. the file will look now 'Carl went home.'. I
can also append to the file using:
open RESULTS, ">>results.txt";
If the file sits on C:\\, then using
open RESULTS, ">results.txt";
actually wipes the file and 'Fred went home.' turns into 'Carl' only.
Is this known and expected behaviour, and is there a way to force it to
wipe out the content of a file?
Running on a Windows 2000 machine using the latest PXPerl
(http://pxperl.com) installation, the 'server' actually being a shared
folder in VirtualPC (which Windows sees as a server).
Cheers
Markus
using
open RESULTS, ">results.txt";
does not delete the contents of the file if the file sits on a server.
However, using print I can overwrite as many characters as I want. For
example, if the content of the file is 'Fred went home.', and I write
(via print) 'Carl' then only the first four characters get replaced
with rest remaining, i.e. the file will look now 'Carl went home.'. I
can also append to the file using:
open RESULTS, ">>results.txt";
If the file sits on C:\\, then using
open RESULTS, ">results.txt";
actually wipes the file and 'Fred went home.' turns into 'Carl' only.
Is this known and expected behaviour, and is there a way to force it to
wipe out the content of a file?
Running on a Windows 2000 machine using the latest PXPerl
(http://pxperl.com) installation, the 'server' actually being a shared
folder in VirtualPC (which Windows sees as a server).
Cheers
Markus