> #!d:\perl\bin\perl.exe -w
> use CGI::Carp (fatalsToBrowser); 
> 
> # Get the input
> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); 
> 
> # Split the name-value pairs
> @pairs = split(/&/, $buffer); 
> 
> foreach $pair (@pairs) {
> ($name, $value) = split(/=/, $pair); 
> 
> # Un-Webify plus signs and %-encoding
> $value =~ tr/+/ /;
> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> $value =~ s/<!--(.|\n)*-->//g;
> $FORM{$name} = $value;
> } 

I haven't seen the original post, but you can simplify the above code as follows:

    use strict;
    use CGI qw/:cgi-lib/;
    my %FORM = Vars;

There are a few problems with the code you listed above and using CGI.pm will help you 
get around
them.  Type 'perldoc CGI' to learn more about this wonderful module :)

Cheers,
Curtis "Ovid" Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to