in reply to Checking number of lines in bzipped file

I don't know about your errors, but I did notice a problem with your parallelisation: You wait always for the slowest of the first eight (16th, 24th, etc) to complete before moving on to the ninth (17th, 25th, etc). Parallel::ForkManager does exactly what you're doing without that bug.

I tried $bz = bzopen($file, "rb") first but it didn't work so I figured a hash might be better to generate a new variable each time?

If you want a new variable, use my.

There's no difference between a scalar and a hash with a single element, so it's nonsense to use a hash there.