Gossamer Forum
Home : General : Perl Programming :

The use cgi module

Quote Reply
The use cgi module
I am a relative novice at the language, and am really used to using my own form parser. However, it does not handle uploads. I have to use another script for this, which uses the relatively hard to understand use cgi; module.

My question, how do I parse form data with this, such as a name. I know in the normal parser I use, the code is:

$scalar = $formdata{'formentry'};

but after trying it on this script, I have had no luck.

Thanks!

Quote Reply
Re: The use cgi module In reply to
I use:
Code:
$variable = param('variable');
If you're into OO, then you can use:
Code:
my $in = new CGI;
$variable = $in->param('variable');
Read: perldoc CGI

--Drew
Free, hot camel soup for Links hackers...
http://www.camelsoup.com
Quote Reply
Re: The use cgi module In reply to
For Junko's method you can just use....

use CGI qw(:standard);

at the top of the script if it isn't already there....

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: The use cgi module In reply to
You guys never stop amazing me... It worked perfectly! Thanks a ton.