http://qs321.pair.com?node_id=638837


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