
saxophonemaster
New User
Aug 23, 2012, 10:59 AM
Post #1 of 2
(1307 views)
|
Converting from hex string to ascii string - reading post data
|
Can't Post
|
|
I'm having difficulty reading post data and converting it into the ascii representation of the string The main issue is that in the following code the variable $value still has non alphanumerical characters such as %3D that is the equal sign. I'm not sure how to make these ascii characters.
foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair, 2); $value =~ tr/+/ /; $value =~ s/%(..)/pack("C", hex($1))/eg; #print "<b>$name:</b> $value<br />"; $FORM{$name} = $value; }
|