I'll re-post this here as the other post is marked as the duplicate

What you'll probably want to do is Walk through the bulleted list and for each bullet:

  1. Pull off the first line of text (the name)
  2. Then get the link from the link(s?) that comes after that bullet, but before the next.

It may be difficult to do with TokeParser since the generated page doesn't close their list-element ( <li>) tags, and I don't know what it can or can't handle. If it does not work, as much as It's usually unwise to advocate it, since you have a "known format" you're working with, it would be possible to parse this page with regular expressions:

my @document = split /\n/, $document; my $entry = ''; foreach ( @document ) { m|^<li>(.*?)</strong>| and do { $entry = $1; next }; m|<a href=(.*?)>(.*?)</a>| and do { my $url = $1; $url =~ s/CMD=TABLES/CMD=RET/; my $text = $2; if ($text eq "STF1A" || $text eq "STF3A") { print OUTPUT "<a href=$url/FMT=HTML/T=P1>$entry $text</a>< +br />\n"; } next; }; }

In reply to Re: Retreive, modify, & display webpage by AidanLee
in thread Retreive, modify, & display webpage by Sang

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.