use URI::Escape; use LWP::Simple 'get'; my $file = uri_escape('xml/myfile.xml'); get("http://www.example.com/FileServe?file=$file");