#!/usr/bin/perl use strict; use URI::URL; use URI::WithBase; my $str = "http://www.techweb.com/wire/ebiz/166401941"; my $url = URI::WithBase->new($str); my $base = $url->base; print "\n -- has base: $base\n"; this prints : -- has base: Why don't I get a base URL?