http://www.perlmonks.org?node_id=120724


in reply to searching a text file

On behalf of JJ004 I will mention that, through conversation in the chatterbox, we found that his webhost (tripod.com) does not provide the warnings or carp modules.

The file he is searching uses the following format:
***Begin Con Quéso? 21/Oct/2001 7:26:51 -4h = EST Joel Demelira Con_Quéso? 21/Oct/2001 07:26:51 -4h = EST Del Maré Cujo van Ouaiden! ***Begin Here*** ***End Con Quéso? 21/Oct/2001 7:26:51 -4h = EST
The ***Begin Here*** line starts a list of replies to the post. I visited the site, and noticed that no matter what you search for, it comes back with the previous post as its search result. (which also happens to be the first in the file.)

My suggestions would include using a better format for the data file, perhaps using a DBM file or _insert_your _favorite_here. Also, knowing that this is for a hand-rolled message board, I would suggest he read up on perlfunc:flock as well. A broad suggestion would be that he find some other examples of small message boards and see just how they were implementd.