http://www.perlmonks.org?node_id=434486


in reply to Re^3: Can the "#" character be passed via $ENV{QUERY_STRING} ?
in thread Can the "#" character be passed via $ENV{QUERY_STRING} ?

I think that should be:
s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg
In fact, that's pretty much exactly what's in URI::Escape, except that the module also handles scalar v. list context and multiple arguments. Using uri_unescape still seems preferable to me, since the resource overhead of using the module is basically nil and the mnemonic benefit of seeing uri_unescape instead of a regex is considerable.