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;
2.1m questions
2.1m answers
60 comments
57.0k users