What Connie is looking for is something that translates an ordinary string to a "urlencoded" string, I don't know what does that but I got around the problem myself by using the modules: LWP::UserAgent; HTTP::Request::Common;
Jonathan ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Connie Chan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, July 11, 2002 2:53 PM Subject: Re: What is this string type? How to play with? > 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] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]