Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: File Searching

by sgt (Deacon)
on Sep 13, 2007 at 16:00 UTC ( #638837=note: print w/replies, xml ) Need Help??

in reply to File Searching

One thing not addressed in the previous two posts is the space-time tradeoff (there is always one). If the file is big, there could be some advantage in transforming the data in a dbm file to which you tie in your search/update program (see 'perldoc perltie')..

To take care of duplicates use some *marker* '$hash{$ip} .= $MARKER. $text' (anon arrays don't play well as dbm-hash values IIRC; choose $marker such that split is easy if you need to spit back the old flat file).

cheers --stephan

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2023-03-26 06:40 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.