You have already been provided all of the answers that you need in order to get this done, so I am not adding anything there. This is more of a rant than anything.
One of the greatest things about perl is how incredibly cross platform it is. It is so amazingly easy to just pick up a script from a *nix machine and move it to a Windows machine with hardly a change at all. Unless of course you don't use modules. That is where this problem comes from. If you had already been using the Net::SMTP module on the *nix side, you would not have had to make a change at all to this script.
I don't understand why people consistently choose to roll their own, especially when you make a call to an external program. Sure, maybe now you don't see a need for cross platform capabilities, but at some point in the future you will. If you consistently make use of whatever module is available (especially the "standard" ones) then you will not run into these "problems" in the future..
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||