1 2 3 4 5
perl -wle ' use URI; my $uri = URI->new_abs("../foo/bar/baz.html", "http://www.foo.de/"); print $uri->canonical; '
http://www.foo.de/../foo/bar/baz.html
Quote$uri = URI->new_abs( $str, $base_uri )
Constructs a new absolute URI object.
The $str argument can denote
a relative or absolute URI. If relative, then it is absolutized
using $base_uri as base. The $base_uri must be an absolute URI.
http://www.foo.de/foo/bar/baz.html
http://www.foo.de/../foo/bar/baz.html
http://www.foo.de/foo/bar/baz.html
2013-07-10T14:57:58 GwenDragon
http://a/b/c/d;p?q