Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2020-11-26 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?