I downloaded your script and it worked! You should have the result in your inbox, and your Perl part is working. I suspect that 'sendmail' or another dependency isn't configured properly.
If you don't get the email, let me know.
Good Luck...Ed
"Well done is better than well said." - Benjamin Franklin
Comment on Re: unable to establish SMTP connection