in reply to Digest::MD5 seems to slow down script
Additionally the construct md5_hex(<IN>) is not optimal, because it reads the file line by line (even though there is no reason to split it up into lines at all), and loads the whole thing into memory before starting to process. Using $ctx->addfile(*IN) (as described in the Digest::MD5 documentation) instead should be a lot faster.
Finally you should probably set binmode on the IN file handle.
|
|---|