"", .
my $a = "http://site.com";
my $part = "index.html";
my $full = "$a/$part";
print $full;
>> http://site.com/index.html
Update:
. CPAN , .
, . , - . URI, , , , . File::Spec .
my $a = 'http://site.com';
my @paths = qw( /foo/bar foo //foo/bar );
print join "\n", "Bad URIs:", map "$a/$_", @paths;
my @cleaned = map s:^/+::, @paths;
print join "\n", "Cleaned URIs:", map "$a/$_", @paths;
, $path = /./foo/.././foo/../foo/bar;, . , cannonical path File::Spec.
/ URI, , ( , , ) URL- , URI , , , .