W P wrote:

> i'm making my own (hopefully informative) error pages for my site.  i have defined a 
>subroutine pr_error which takes the error(s) as input and outputs an HTML page.
> how can i make it go to the end of the script ( __END__ ) on those errors (which 
>will not necessarily be fatal).
> 
> for example:
> 
> my %userSession = $qry->cookie('userSession') or pr_error( " Not logged in. " );
> my $user = $userSession{'user'};
> 
> 
> i want the script to finish at the end of the pr_error() subroutine, rather than 
>going on to the next line (where $user is assigned a value from the cookie).  any 
>suggestions?


can you put an exit(); in your pr_error sub?

e.g.-

sub pr_error {
   my $message = shift;
   # print html code
   # goes here
   exit();
}


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to