Net::Domain::Regex - Match DNS domain names and extract into TLD, Domain and hostname parts.
use Net::Domain::Regex; use Data::Dumper; my $c = Net::Domain::Regex->new; while( <> ){ chomp; if( my @rc = $c->match( $_ ) ){ print Dumper( \@rc ),"\n"; } }
This module is used for finding and extracting domain names from a series of text.
This module is written with an object oriented interface.
This method instantiates the object. It attempts to parse the TLD/SLD cache and load the domains into its object store.
Parse the local file, generating all TLDs and SLDs.
Pull the remote file for processing. Requires LWP for this.
LWP
To install Net::Domain::Regex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Domain::Regex
CPAN shell
perl -MCPAN -e shell install Net::Domain::Regex
For more information on module installation, please visit the detailed CPAN module installation guide.