Telephone::Lookup::Americom - Lookup area, exchange, service provider, etc. information from Americom.
use Telephone::Lookup::Americom; my $am = Telephone::Lookup::Americom->new(); my @res = $am->lookup('212-555-1212');
This module uses Americom Area Decoder (http://decoder.americom.com/) to lookup information about a phone number. It parses the return form and returns a list of hash refs, one for each record found.
my @res = $am->lookup('212'); ## lookup only area code my @res = $am->lookup('212-555'); ## area code and exchange my @res = $am->lookup('212-555-1212'); ## or full phone number ## The form also seems to accpept numbers of the form '2125551212' and '(212) 555-1212'. ## The module can return two datatypes: for my $record (@res) { if ($record->{_type} eq 'AREA_CODE'} { # The fields are: # $record->{'area_code', 'location', 'created_on'} } elsif ($record->{_type} eq 'EXCHANGE_CODE') { # The fields are: exchange_location, exchange_type, exchange_owner, created_on } }
None by default.
To install Telephone::Lookup::Americom, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Telephone::Lookup::Americom
CPAN shell
perl -MCPAN -e shell install Telephone::Lookup::Americom
For more information on module installation, please visit the detailed CPAN module installation guide.