Skip to content

Instantly share code, notes, and snippets.

@MadcapJake
Created April 21, 2016 03:47
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 MadcapJake/4f54af99262831d8d7dbfa0078f694e3 to your computer and use it in GitHub Desktop.
Save MadcapJake/4f54af99262831d8d7dbfa0078f694e3 to your computer and use it in GitHub Desktop.
High-Level HTML::MyHTML Interface RFC
use HTML::MyHTML
# basic init
my HTML::MyHTML $parser .= new;
# gather some html
my $website = qx{curl -s http://www.example.com};
# parse html
$parser.parse($website);
# collect title tags
my @collection = $parser.tree.nodes:tag<title>;
say "Title: {@collection[0].Str}"
@collection.dispose;
$parser.dispose;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment