a first quickshot. this can be finetuned to better fit your needs:
#always use strict; #load modules use File::Find; require HTML::LinkExtor; #create a HTML::LinkExtor-instance for later use my $links = HTML::LinkExtor->new ( # first argument is a subroutine that will # be called for every link in the html # the object parses sub { # $tag can contain "a" or "img" # %links contains the "attributes" of the link my ($tag, %links) = @_; #print if we have a "a"-link that is not #page internal (no "#") print "$links{href}\n" if $tag eq "a" && $links{href} =~ /^[^#]/ ; } ); #find all html-files in a tree find ( #first argument is the sub that will be called #for every file AND directory found sub { # check if we have file that has htm or html-suffix if ( -f $File::Find::name && if $File::Find::name =~ /\.htm(l) +?/ ) { #if so, parse it for links print "$File::Find::name contains:\n"; $links->parse_file($File::Find::name); } } , "c:/perl" );
Learn by examining code. You should change "c:/perl" to the path you need.

p.s. what is wrong with the docs of "File::Find"? They belong to the better ones.

Update:
Added comments

holli, regexed monk

In reply to Re: Tutorial on File::Find even more basic than "Beginners Guide" by holli
in thread Tutorial on File::Find even more basic than "Beginners Guide" by ww

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.