Syntactic Confectionery Delight | |
PerlMonks |
Re: Quick and dirty counterby merlyn (Sage) |
on Jan 18, 2002 at 21:38 UTC ( [id://139877]=note: print w/replies, xml ) | Need Help?? |
This is quick, dirty, and faulty. You are not getting exclusive access to the file, so if multiple hits come in at roughly the same time, someone will zero the file while someone else is reading it, and your counter will "reset". It's not a matter of "if", but "when".
What problems did you have with File::CounterFile? That would be more instructive to bring out than to rewrite it (and incorrectly!). -- Randal L. Schwartz, Perl hacker
In Section
Cool Uses for Perl
|
|