Connie,
Something like the following is probably what you are looking for. Of course what
you should be
doing is using CGI.pm or some other tested form of input retrieval.
----------------------------------------------------------------------------
my @variables = split(/[\&\;]/, $input);
foreach $variable (@variables) {
next if ($variable !~ /\=/);
my ($name, $value) = split(/\=/, $variable);
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
# assignment to some form of a variable structure that you will be
# using out side this loop. Keep in mind, you may have multiple
# values for the same name.
}
----------------------------------------------------------------------------
Regards,
David
----- Original Message -----
From: "Connie Chan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 4:21 PM
Subject: What is this string type? How to play with?
Hi all,
With get method from form, we always see that the
$ENV{QUERY_STRING} like this :
&message=%20%2F%15+...&.......
btw, what is the name of that string in types of ? Escape ? Unicode ?
With simple tr/// and s///, I can get back what exact the input
is, but, how can I make a the input back to the.... above format ?
Totally have no idea...
Rgds,
Connie
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]