in reply to Sending email, would like a success (or failure) page to display

As the documentation says, the success object is returned from the sendmail subroutine.
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

    Thank you!

    I read the documentation but I didn't understand how to apply it, I am wiser now.