I'm not an expert but perlmonks is full of good posts about threads and shared vars: in my experience it will be worth to search for BrowserUk's and zentara's answers, among others. L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.