I wouldn't say nobody answers your questions, which all seem to relate to the same problem. And since the code looks very much like a spambot, you could save yourself and perlmonks the hassle of giving you all the answers/code to get you to a working spambot or similar beast...with many such things being freely downloadable and configurable in lots of ways. What got me onto this track in the first place is the way you ask your question and the way you respond to fair comments/answers by perlmonks. This is free help/advice/code thanks to the helpful perlmonks, and is not a place to get your legacy code fixed in only the exact way you want and no other. Your responses show only partial insight into perl and OS, so alternatives get offered. We're definitely not god like, but don't take to being dictated to. Or if you want your legacy code to be fixed on your own terms, hire a contractor.