Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); if (length($buffer) < 5) { $buffer = $ENV{QUERY_STRING}; } @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; $input{$name} = $value; } } print "$in{'app_name'}";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing "&" from header.
by halley (Prior) on Mar 26, 2004 at 14:23 UTC | |
by Anonymous Monk on Mar 26, 2004 at 14:52 UTC | |
|
Re: Parsing "&" from header.
by Happy-the-monk (Canon) on Mar 26, 2004 at 13:28 UTC | |
by halley (Prior) on Mar 26, 2004 at 14:08 UTC | |
|
Re: Parsing "&" from header.
by fireartist (Chaplain) on Mar 26, 2004 at 13:38 UTC | |
by Anonymous Monk on Mar 26, 2004 at 14:04 UTC | |
by Happy-the-monk (Canon) on Mar 26, 2004 at 14:17 UTC | |
|
Re: Parsing "&" from header.
by fireartist (Chaplain) on Mar 26, 2004 at 16:02 UTC | |
|
Re: Parsing "&" from header.
by kutsu (Priest) on Mar 26, 2004 at 15:58 UTC |