Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: searching a text file

by Zecho (Hermit)
on Oct 23, 2001 at 11:17 UTC ( #120724=note: print w/replies, xml ) Need Help??

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 ( 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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://120724]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2021-04-13 00:41 GMT
Find Nodes?
    Voting Booth?

    No recent polls found