#!/usr/bin/perl unless ($ENV{'CONTENT_LENGTH'} eq "") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
@pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($jname, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $$jname = $value; }
$work = $ENV{"QUERY_STRING"}; @pairs_end = split(/&/, $work); foreach $pair (@pairs_end) { ($kname, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $END{$kname} = $value; }
print "content-type:text/html\n\n"; print "$test ´Â post°ª <br> $END{'test'} ´Â get°ª";
|