getParamaters(); $data = $getParam{'hand_history'}; print "$data
"; sub getParamaters{ if ($ENV{'CONTENT_LENGTH'} > 0) { # read POST data from STDIN print "READING POST DATA\n"; read STDIN, $temp, $ENV{'CONTENT_LENGTH'}; # add in the GET data: $temp.="&".$ENV{'QUERY_STRING'} if length
$ENV{'QUERY_STRING'}; } else { # read only the GET data #print "READING GET DATA\n
"; $temp=$ENV{'QUERY_STRING'}; } # separate each keyword foreach ( split( /&/, $temp ) ) { # separate the keys and values ( $key, $val ) = split( /=/, $_, 2 ); # translate + to spaces $key=~s/\+/ /g; $val=~s/\+/ /g; # translate %xx codes to characters $key=~s/%([0-9a-f]{2})/pack("c",hex($1))/gie; $val=~s/%([0-9a-f]{2})/pack("c",hex($1))/gie; $getParam{$key} = $val; }