Hello Datz_cozee75,

(1) When I enter http://dailynews.yahoo.com/h/tc/ — or even just http://dailynews.yahoo.com — into Google Chrome, I get:

This web page is not available
ERR_NAME_NOT_RESOLVED
...
The server at dailynews.yahoo.com can't be found because the DNS look-up failed....

Looks as though the web address has changed to http://news.yahoo.com/?

(2) Is there a question 2?

(3) Within the call to map, each element of the array @links is in turn aliased to $_ (see map). @links was previously initialised via a call to get_headlines(), which returns the elements in @out. The latter is populated by this line:

push @out, [ $link->attr('href'), $link->as_text ];

which creates an anonymous array containing two elements, and pushes a reference to it onto the array @out (see perlreftut). So, within the map, $_->[0] is the first element of the anonymous array currently referenced by $_, and $_->[1] is the second element.

(4) Sorry, I don’t know how to get just the headlines from http://news.yahoo.com/.

Anyway, hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,


In reply to Re: using HTML::TreeBuilder effectively by Athanasius
in thread using HTML::TreeBuilder effectively by Aldebaran

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.