Reading large files is likely to be I/O bound not CPU bound, so it's not surprising that making it multi-threads didn't help.
You could try profiling your single threaded version to see where the time is being spent, and then try to improve that.
How do I profile my Perl programs?
But your code looks pretty simple, so it may not have much improvement to give.
In reply to Re: problem of my multithreading perl script
by RichardK
in thread problem of my multithreading perl script
by qingfengzealot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |