in reply to sharing complex data structures

You can more or less forget about successfully sharing objects using threads::shared unless their documentation explictly states that you can.

Also, because of the way WWW::Mechanize (I'm assuming that's what you mean by "$mech") works - it has a concept of "the current page I'm looking at", for one - sharing the same mechanize object is probably not going to be very useful. Is there any reason you're not using a separate mechanize instance per thread?