http://www.perlmonks.org?node_id=1214676


in reply to Re: Multithreading a large file split to multiple files
in thread Multithreading a large file split to multiple files

One more possible optimization: when you want to check for the presence of constant strings (e.g. Index, USDSWAP) in the input, you can use if (index($_, 'USDSWAP') != -1) { ... } instead of a regex.