in reply to Trouble getting Net::SMTP to work

For debugging, I would first suggest using strict and warnings - that might be of some help when you are going through the code...

Another thing, use debug in the SMTP initialization as well:

$smtp = Net::SMTP->new('smtpmail.server.com', Hello => 'company.com', Timeout => 30, Debug => 1); #Set to 0 in production version
When you run the script with the debug, you should see much more output, hopefully showing you where your problem is...