[JaxPM] Error message

-Sx- IUDICIUM sneex at mac.com
Wed May 15 09:13:59 CDT 2002


On the jacksonville-pm-list; Jax.PM'er -Sx- IUDICIUM <sneex at mac.com> wrote -

Also, as a side note -

On Wednesday, May 15, 2002, at 09:11  AM, Andre McDowall wrote:

> if (!$ENV{'HTTP_REFERER'}) {
>
> print "<html><head><title>Access denied</title></head>\n";
> print "<body>\n";
> print "You may not access this page.\n";
> print "Your attempt has been logged.\n";
> print "Your Ip address has been logged.\n\n";
>
> print "\n";
> print "\n\n";
> print "</body></html>\n";
>
> exit;
>
> }


Would be better written as a HERE_DOC:


if (!$ENV{'HTTP_REFERER'}) {

print<<Referrer_Error;
<html><head><title>Access denied</title></head>
<body>
You may not access this page.
Your attempt has been logged.
Your Ip address has been logged.
</body></html>
Referrer_Error

exit;
}

And, in case you were not aware, the \n\n newlines will not be 
rendered in the HTML, if you want two \n\n you would need two 
<br><br> or a <p> html tag.

HTH;
_Sx____________________
    "iudicium ferat"


Jax.PM Moderator's Note:
This message was posted to the Jacksonville Perl Monger's Group listserv.
The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list