in reply to Blocking based on words in a list
Of course, you don't want to be using a single, hardcoded file name. If someone else submits a comment at the same time, your block.txt will get overwritten, avoiding your scan. Look into File::Temp.
Updated: (repeating messaged clarification for the benefit of others) The problem isn't with the code you've shown. Suppose I click submit. Your code dumps my comment into block.txt. Before the file is read in by your scanner, someone else submits a comment. Now your scanner checks block.txt, but not MY block.txt. Depending on how the rest of your code works, my comment is either dropped (bad) or not scanned (also bad).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Blocking based on words in a list
by esskar (Deacon) on Dec 29, 2005 at 09:21 UTC |