wackattack has asked for the wisdom of the Perl Monks concerning the following question:
getParamaters(); $data = $getParam{'hand_history'}; print "$data <br>"; 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 <br>$ENV{'QUERY_STRING +'}; } else { # read only the GET data #print "READING GET DATA\n<br>"; $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; }
Edited by Chady -- removed <br> tags from code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Line break problems
by nedals (Deacon) on Sep 03, 2005 at 02:00 UTC | |
|
Re: ugh... line breaks
by CountZero (Bishop) on Sep 02, 2005 at 23:19 UTC |