http://www.perlmonks.org?node_id=1013862


in reply to Re^2: Seeking guidance for more idiomatic way of (re)writing this script.
in thread Seeking guidance for more idiomatic way of (re)writing this script.

topher++

I'd consider having

else { die "send_mail - bad type: $type\n" }
at the end.

Replies are listed 'Best First'.
Re^4: Seeking guidance for more idiomatic way of (re)writing this script.
by topher (Scribe) on Jan 18, 2013 at 00:25 UTC

    Excellent suggestion; I should have thought to include something like that.

    I'll update the function to include it.