....And that is why it it should come as no surprise to anyone that you have 130911 XP at perlmonks, probably more once I hit the "submit" button; because you are awesome. Your code speaks for itself.

...And with no disrespect I have to say that the awesomeness of that code design is very similar in practice to the approach I used for my own assignment at $work, only I used the threads a little differently. There were two primary threads that shared a queue -- a downloader and a queue processor, and the downloader spawned five to ten threads to process downloads in parallel and return their downloaded payload as scalars to the primary downloader thread. The downloader then put together the datastructure that became the queue which was then consumed by the queue processor thread.

Everything worked fine on my RHEL 6 machines and my Debian servers. It even worked on the ubuntu workstation I was developing on at the time... But it puked on those proprietary custom-built RHEL 5 beasties. I was heartbroken, because it was clear that I had to abandon the code while it was so pure and elegant. It became much more cumbersome than one might think when I had to start bolting on Storable and working out my own locking mechanisms. Sure, I had the core files and I might have been able to dig deeper into the problem with those, but I didn't even want to start poking at them for fear that the approach was ultimately toxic. Maybe that was a mistake, but I had a looming deliverable and I couldn't take the risk of burning through development time trying to work out an already problematic methodology (at least in that environment). In the end, it was my name on the code when I handed it over, and naturally it had to function without flaw.

At the end of the day, upper management didn't give an END {} block how the code was written; they cared that it met client requirements, that it required very little RAM, that it ran bullet-proof for months at a time, and that everybody looked good for getting it done on time.

I always lamented what I saw as a lost opportunity, but took it as a lesson learned to -- at least for me -- beware of threads::shared on old perls.