in reply to Looking for regexp to convert hex numbers in text

From where I learned Perl, you can do this:
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
You can use pack "C" here, to convert to unsigned chars. I use this as a part of URL decoding in CGI scripts.

This packs a pair of Hex characters into an unsigned character, using the substitute function.