<snippy>
> From your example, it appears that you simply need to parse a
> URL-encoded
> string. For that, you could use this regex, which uses the chr and hex
> functions to translate URL-encoded characters:
>
> $string =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
Is this better than
$string =~ s/%(..)/chr hex $1/eg;
Which is what I finally manged to come up with?
> However, if you are getting GET or POST input and wish to parse it, I
> strongly recommend that you use the built-in module CGI.pm.
> If this is the
> case, you could do it like this (see the CGI.pm documentation
> for a better
> description):
>
> use CGI;
> $query = new CGI; # create a new query object.
>
> @values = $query->param; # assign @values to the names
> of all the
> # keys in $query
>
> $value = $query->param('foo'); # assign $value to the value of "foo"
Aaah! I see. I thought we were already doing that, but I shall go and have
another look.
Thanks a lot everyone.
Di
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]