
my $x = 'hello%20world'; #set the string to hello%20world, 
        #note single quotes so no interpolation
$x =~ s/%([A-Fa-f\d]{2})/chr(hex($1))/eg;
                #note %20 is the hex encoding for a space
