use URI::Escape; my $filename = uri_unescape('This%20is%20%an%20example.txt');