in reply to Sending email, would like a success (or failure) page to display
if (sendmail($email)) { # On success }
Without success, the subroutine thows an exception, i.e. dies. Therefore, without evaling the subroutine (or using something like Try::Tiny), you don't have to check the success.
if (eval { sendmail($email) }) { # On success... } else { # On failure }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sending email, would like a success (or failure) page to display
by tonto (Friar) on Jun 13, 2015 at 20:19 UTC |