use URI::Escape; print uri_unescape('This%20is%20a%20string') . "\n";