in reply to Search Efficiency

You can use tell to save the current position of the file handle, and then use seek to return to it later.

Look at DBD::CSV for a solution that will keep you from having to scan the files yourself. However, I don't know how efficient it is in terms of re-scanning.

Also, the BerkeleyDB module should be able to handle flat files efficiently if you use its DB_RECNO and specify a -Delim=>'|' .