good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The effect of these two lines will be so that when you run the script for the first time, the open(filehandle, filename) || die doesn't die because the file does not exist. Otherwise, the script would die continuously until you manually created the file. In theory, the ">>" (append) should prevent data from being overwritten in the file if it does exist and you crash with an open filehandle - although that's perhaps not the safest way of doing things. Try removing these lines, and putting a &CreateFile() unless -e $filename; earlier on in the code instead. In reply to Re: Re: Mysterious Disapperance of file contents
by dtr
|
|