![]() |
|
Just another Perl shrine | |
PerlMonks |
Re: File Searchingby sgt (Deacon) |
on Sep 13, 2007 at 16:00 UTC ( #638837=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|