sub DieWithCode { my $numerical_exit_code = shift; my $msg = shfit; # do something with $msg (inserting application name, linebreaks... if necessary exit ($numerical_exit_code); }