How do I extract the domain out of an URL? Is there a Perl Module? I could not find any.
The URI module can parse URIs for you in a nice OO-ish way. To get the domain part:
my $url = URI->new( "http://www.stackoverflow.com/" ); my $domain = $url->host; print $domain;
1.4m articles
1.4m replys
5 comments
57.0k users