Hi all,
I have a script that logs activities to a txt log file. I noticed that
when deleting the file from another window or shell, the script stops
writing to the file. I was expecting something like the unix shell,
which is creating a new file and appending to it.
execute this script:
#!/usr/local/bin/perl
use FileHandle;
open(LOGFILE,">>logFile");
LOGFILE->autoflush;
while (1) {
sleep 1;
print LOGFILE ("test\n");
}
After few seconds, and from another terminal, delete the file that was
created by the script, notice that the script won't stop or error out,
but in the same time no new file is created.
Thanks,
Mahdi
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/