If you used strict or warnings, Perl would tell you what goes wrong.
In reply to Re^5: getting SMTP failure codes by Corion in thread getting SMTP failure codes by e5z8652