in reply to Perl to CGI
## 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 |