in reply to How do I get data from a web form (the correct way)?

Hey! If you go to www.htmlgoodies.com, and check the PERL Primers, they will give you the code below:
if ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; }
The code above will make it so that if you put $FORM{'name'}, you will get the name variable. The different variables will be made from the form's name for the different things you use (text box, text area, etc.). Hope this helps. -Voytek

Originally posted as a Categorized Answer.