#!/usr/bin/perl use URI::file; my $file = URI::file->new( 'http://foo.com/bar/file.foo' )->file; print $file, "\n";