$q = CGI::Simple->new; $full_url = $q->url(); $full_url = $q->url(-full=>1); $relative_url = $q->url(-relative=>1); $absolute_url = $q->url(-absolute=>1); $url_with_path = $q->url(-path_info=>1); $url_with_path_and_query = $q->url(-path_info=>1,-query=>1); $netloc = $q->url(-base => 1);