use Encode;
# ... assign goofy string value to $test ...
$test =~ s/%([0-9A-F]{2})/chr(hex($1))/eg; # convert hex digits to oct
+ets
$test = decode( "utf8", $test ); # convert octets to unicode characte
+rs
The "decode" call (provided the Encode module) might not be necessary, depending on what you need to do with the string value. If you're just going to print it to a "raw" file handle, just print it with no further ado. But to use it as utf8 text (or print to a file handle that has been set to use utf8 mode) you need to "decode" it first.
UPDATE: Of course, ikegami's approach is the better way to go.