in reply to Regex to cange HTML %?? to char(0x??);
Well, here's a solution, but there's a module that does this--I just can't think of it now. Give CPAN a good look, and someone will probably respond with it. Here's the solution:
$str =~ s/%([0-9A-Fa-f][0-9A-Fa-f])/chr(hex($1))/eg;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Regex to cange HTML %?? to char(0x??);
by TGI (Parson) on Jun 19, 2001 at 23:56 UTC | |
by Abigail (Deacon) on Jun 20, 2001 at 02:31 UTC |
In Section
Seekers of Perl Wisdom