Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Catching Apache error with a Perl script

by CombatSquirrel (Hermit)
on Aug 20, 2003 at 11:44 UTC ( [id://285161]=note: print w/replies, xml ) Need Help??


in reply to Catching Apache error with a Perl script

I think that you will hardly get any solution without a module. Besides, as far as I know, CGI is already in the standard distribution, so that it won't matter for you anyways. And your code will be much more readable if you have the networking stuff in another module.
I've never done any CGI programming or such, since I don't have a webserver which I could use, but the following should (possibly after debugging) work:
#!perl use strict; use warnings; use CGI qw[:standard]; param() or die "Need to provide a parameter\n"; param('err') or die "Need to provide error number\n"; print header, start_html('My error report'), "Hey, I got error ", em(param('err')), p, ". Great, isn't it?", hr;
Hope this helps anyways.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://285161]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-25 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found