
andy7t
User
Aug 28, 2003, 6:39 AM
Post #1 of 3
(730 views)
|
Havoc from Spaces!
|
Can't Post
|
|
Hi, read(STDIN,$indata,$ENV{'CONTENT_LENGTH'}); @indata = split(/&/,$indata); foreach $i (0..$#indata) { $indata[$i] =~ s/\+/ /g; ($key,$val) = split(/=/,$indata[$i],2); $key =~ s/%(..)/pack("c",hex($1))/ge; $val =~ s/%(..)/pack("c",hex($1))/ge; $indata{$key} .= "\0" if (defined($indata{$key})); $indata{$key} .= $val; } This reads data inputted from another page. But what i need to be able to do is get rid of the last character of EACH $indata IF it is a space. e.g "This " goes to "This" Thanks
|