Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Perl to CGI

by tenatious (Beadle)
on Aug 18, 2000 at 06:22 UTC ( [id://28417]=note: print w/replies, xml ) Need Help??


in reply to Perl to CGI

The following will trap some errors. Other problems could be related to your permissions, where you are outputting the stuff (/output.txt looks like it resides in the root directory, not in a directory writable by "nobody") at the beginning of the script do:
## Use the fabulous CGI.pm module is usually installed use CGI; my $C = CGI->new(); ## create a code ref to the DIE event handler $SIG{__DIE__} = \&my_die; ## create a sub to handle the dies sub my_die { print $C->header,$C->start_html; print qq(<p>@_</p>); print $C->end_html; }

and let it go.

When you use the CGI module you can also pass parameters to the script from the command line that you would pass from the form. i.e.:

$ ./my_script.cgi username=tenatious password=hideyho! age=1000 IQ=1

and lastly, make sure that the script is world executable:

chmod o+x my_script.cgi

Replies are listed 'Best First'.
RE: Re: Perl to CGI
by merlyn (Sage) on Aug 18, 2000 at 06:33 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-25 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found