All pastes #57882 Raw Edit

Something

public ini v1 · immutable
#57882 ·published 2006-05-22 03:51 UTC
rendered paste body
Fixed the telcodata_lookup subroutine to properly handle an invalid request:sub telcodata_lookup {my ($npa, $nxx) = @_;my $req = get('http://www.telcodata.us/query/queryexchangexml.html?npa=' . $npa . '&nxx=' . $nxx);if (defined $req) {my $res = $xml->XMLin($req);if ($res->{exchangedata}->{validnumeric} eq "1") {my $clidname = '* ' . $res->{exchangedata}->{ratecenter} . ', ' . $res->{exchangedata}->{state};return $clidname;}}return "";}