Below is my code:
That code doesn't have 42 lines. Thus the error is coming from another program. As we can't see it, we can only guess as to what it might be.
As a side note, why are you using fork? Do you have a multiprocessor machine? Your single file is probably on a single hard drive and almost definitely on a single hard drive controller. Your bottleneck here is IO. As your algorithm doesn't support the overlap of lines, you can't even benefit from any OS-level caching.
I'm also not sure that Tie::File is fork safe. It might be. I don't know.
In reply to Re: regarding Tie::File
by chromatic
in thread regarding Tie::File
by xiaoyafeng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |