Hello.
I want to execute a command (module method) and keep trying until successful as it is trying to make a connection to a mail server.
the code is as follows...
i'm a little stuck on how I make this a one liner in perl to say keep trying until successfull.
to check for unsucessful would be
can i do this
your advice is appreciated.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
I want to execute a command (module method) and keep trying until successful as it is trying to make a connection to a mail server.
the code is as follows...
Code:
$smtp = Net::SMTP::Multipart->new("my.domain.com");
i'm a little stuck on how I make this a one liner in perl to say keep trying until successfull.
to check for unsucessful would be
Code:
$smtp = Net::SMTP::Multipart->new("my.domain.com") or die "failed";
Code:
until $smtp = Net::SMTP::Multipart->new("my.domain.com");
your advice is appreciated.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!