How do I unescape a string?

It depends just what you mean by ``escape''. URL escapes are dealt with in Networking. Shell escapes with the backslash (\) character are removed with:

    s/\\(.)/$1/g;

Note that this won't expand \n or \t or any other special escapes.