Skip to content

Instantly share code, notes, and snippets.

@wchristian
Created February 6, 2013 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wchristian/4723193 to your computer and use it in GitHub Desktop.
Save wchristian/4723193 to your computer and use it in GitHub Desktop.
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