use URI qw( ); my $url = URI->new(...); my $base_url = $url->scheme . '://' . $url->host;
It doesn't work for all schemes, but it does work for all schemes where your request makes sense. (http, https, ftp, for starters.)
In reply to Re: modify a URL
by ikegami
in thread modify a URL
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |