in reply to Efficent Text Checking

Hi neversaint,

    "1. Accept an input file text"

It seems you mean "Accept the name of an input file", right?  And, if I'm following correctly, you're trying to find all files which exactly match the text from that input file?

If you have large files, it's going to make your hash keys large and slow.  Why not do a first pass to compare file sizes (using -s <filename>); that way, only files which exactly match the size of the input file will be considered.  Any files left over have a much higher chance of matching!

I would also recommend you don't store the text of the file as a hash, but rather use something like File::Compare, to compare each file against the input file (after, of course, performing the filter-by-size pass).


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/