G
Guy
A quick question...
I'm using Perl to read and also write to a text file that was originally
created in Notepad. Each line in the file is a record. Each record contains
about 4 or 5 tab-separated fields. It will mostly be read, but written to
on occasion. Do i need to flock the file before reading it, or just when I
am writing to it?
PS. I remember a Perl script I had created about 6 or 7 years ago for an
on-line auction of about 100 items. It worked fine for a week, until about
5 minutes before the auction was to end. The text datafiles got messed up a
bit when about 200 people tried to access the site at the same time to put
their final bids. I had forgotten to flock the file before writting to them.
Thanks,
Guy
I'm using Perl to read and also write to a text file that was originally
created in Notepad. Each line in the file is a record. Each record contains
about 4 or 5 tab-separated fields. It will mostly be read, but written to
on occasion. Do i need to flock the file before reading it, or just when I
am writing to it?
PS. I remember a Perl script I had created about 6 or 7 years ago for an
on-line auction of about 100 items. It worked fine for a week, until about
5 minutes before the auction was to end. The text datafiles got messed up a
bit when about 200 people tried to access the site at the same time to put
their final bids. I had forgotten to flock the file before writting to them.
Thanks,
Guy