Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

See Re: Help With Online Table Scraper, Re: Formating a HTML document to show certain text.

$ lwp-download "http://perlmonks.com/?abspart=1;displaytype=displaycode;node_id=934485;part=1" junk.html
281 bytes received

$ perl htmltreexpather.pl junk.html _tag a
HTML::Element=HASH(0xb31bcc) 0.1.0 John.Martines /html/body/a /html/body/a /html/body/a[@href='page.aspx?a=c4bc46eswsdw32fcc'] ------------------------------------------------------------------ HTML::Element=HASH(0xb31d2c) 0.1.1.0.0 Mary Jones /html/body/ul/li/a /html/body/ul/li/a /html/body/ul/li/a[@href='page.aspx?a=0a2b-a99d-3754eb2f5e35'] ------------------------------------------------------------------ HTML::Element=HASH(0xb31e0c) 0.1.1.1.0 Fernando Praderas /html/body/ul/li[2]/a /html/body/ul/li[2]/a /html/body/ul/li[2]/a[@href='page.aspx?a=1ef7b100-8dc4-4b40-871c-68b1d +0'] ------------------------------------------------------------------ ##################################################################

HTML::Query

use HTML::Query qw{ Query }; print "$_\n" for Query( file => q{junk.html} )->query( q{a[href~=page.aspx]} )->as_text ; __END__ John.Martines Mary Jones Fernando Praderas

In reply to Re: A regex question by Anonymous Monk
in thread A regex question by emelianenko

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (17)
    As of 2014-10-30 13:48 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (208 votes), past polls