in reply to Re: Re: Net::SMTP error
in thread Net::SMTP error
where I assume that &do_some_stuff does some error handling. May be you are not aware, it is actually doing this instead -my $smtp = Net::SMTP->new($smtpServer, Timeout => 60) || &do_some_stuf +f $!;
if the object creation fails, your $smtp ends up with whatever is returned from 'do_some_stuff'.my $smtp = (Net::SMTP->new(....) || &do_some_stuff...);
where $smtp is assigned to the new object first, and if it is undefined because of failed connection, then the 'do_some_stuff' error handling will kick in.my $smtp = Net::SMTP->new(....) or &do_some_stuff $!;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Net::SMTP error
by K_M_McMahon (Hermit) on Dec 13, 2003 at 05:03 UTC |