Skip to content

Instantly share code, notes, and snippets.

@b10m
Created October 29, 2012 15:23
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 b10m/3974165 to your computer and use it in GitHub Desktop.
Save b10m/3974165 to your computer and use it in GitHub Desktop.
Fetch a random animal name suited for wiki page tagging
$ perl -MMojo::UserAgent -le 'Mojo::UserAgent->new->detect_proxy
->get("http://en.wikipedia.org/wiki/Chart_of_English_animal_nouns")
->res->dom->find("table.wikitable tr td a")
->shuffle->slice(0..2)->each(sub { print $_->text } );'
@b10m
Copy link
Author

b10m commented Nov 2, 2012

There, added ->detect_proxy for you ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment