The stupid question is the question not asked | |
PerlMonks |
Re^2: Bareword "SEEK_END" not allowed while "strict subs" in use (truncate)by thanos1983 (Parson) |
on May 09, 2014 at 15:30 UTC ( [id://1085593]=note: print w/replies, xml ) | Need Help?? |
To: tye, Ok, starting to make more sense. My plan was to use flock() to lock the file while my process will be either reading or writting to it. I want to avoid 2 processes together reading and writting simultaneously which will result on overlaping. So my plan was to lock the file seek to the end of the file so I can write the next part of my output, close the file and allow the next process to write on it. I was under the impression that I have to use truncate to empty the rest of the file at the end, to make sure there is nothing left besfore start writting. I got this idea from the tutorial File Locking where they use both:
This is my part of confusion.
In Section
Seekers of Perl Wisdom
|
|