Re: How to decode JavaScript's encodeURIComponent in Perl. John Bokma schreef:
> Cloink:
>> $str =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
>
> s/%([0-9a-f]{2}/ chr hex $1 /egi;
^closing bracket missing
s/%([:xdigit:]{2})/ chr hex $1 /eg;
s/%((?ix) [0-9a-f] {2} )/ chr hex $1 /eg;
> Probably better to use URI::Escape.
Yep.
--
Affijn, Ruud
"Gewoon is een tijger." |