if ($q->param('userid')) { } else { &error_message("You need to use the form to access this program!"); } sub error_message { local($e) = @_; print <<"END"; Error
Error. The error seems to be:

$e END exit; }