>>>>> "JG" == Jim Gibson <jimsgib...@gmail.com> writes:

  >> print "Content-type: text/html\n\n";
  >> $forminfo = <STDIN>;
  >> 
  >> @key_value_pairs = split(/&/,$forminfo);
  >> foreach $pair (@key_value_pairs){
  >> ($key,$value) = split(/=/,$pair);
  >> $value =~ s/\+/ /g;
  >> $value =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("C", hex($1))/eg;
  >> $FORM_DATA{$key} = $value;
  >> print $FORM_DATA{'access'};

jim forgot to say NEVER PARSE CGI by yourself. it is frought with subtle
side issues. use CGI.pm or some other module. never do it yourself. this
is cut/pasted cargo cult code. could you explain what that code does
without help? if not, don't use it. beginners especially should never do
that and this being a beginner's list i take the time to hammer out this
point. use CGI.pm for basic cgi programs. or a variant if you wish.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to