in reply to Need Help in threading perl

Add strictures (use strict; use warnings; - see The strictures, according to Seuss) and fix up the issues reported by them to start with. Then tidy up your indentation so your code is at least somewhat readable.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond