Created
February 6, 2013 15:16
-
-
Save wchristian/4723193 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strictures; | |
use 5.012; | |
use WWW::Alexa::TrafficRank; | |
use Tie::Array::CSV; | |
run(); | |
sub run { | |
tie my @file, 'Tie::Array::CSV', 'urls.csv'; | |
my $tr = WWW::Alexa::TrafficRank->new; | |
for my $line ( @file ) { | |
say state $c++ . " / " . ~~ @file; | |
my $url = $line->[0]; | |
my $rank = $tr->get( $url ); | |
$rank =~ s/,//g; | |
$line->[1] = $rank; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment