perlquestion
snoopy20
This is driving me nuts. I have a form with special characters like a pound or euro sign. It's URIencoded and Perl receives it into a variable, so for the pound sign:
<code>%C2%A3</code>
Note that %C2 is actually not needed I don't know why it's included. Anyway, I then run the usual on it:
<code>$f =~ s/%([a-fA-F0-9]{2})/pack('C', hex($1))/eg;</code>
Which gives octals..
<code>\xc2\xa3</code>
But how do I get this back to the pound sign?
I have tried everything and google searching for two hours. It should be simple!