in reply to Losing or overwritting values
This code is always wrong. You have already zeroed the file before you've gotten permission to zero the file.open(USEDPW, "> $usedpw") or die "crap on me for writing $!"; flock USEDPW, 2;
You need to open the file for reading and writing without altering it, get the flock, then proceed. Many correct examples exist. This is not one of them.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|