++ the comments above. Just to add though, $cb is a "callback." Callbacks are great mechanisms for adding your "specialized" code into a generic framework. In this particular case, your cb subroutine will be called as links are found during the parsing of the "index.html". You see
quite a bit of use of the callback approach in parsing style
modules (XML, HTML, etc), gui modules (Tk, Gtk, etc), dispatch tables, and signal handlers. Page
53 of
Advanced Perl Programming has a pretty good definition of callbacks:
A callback function is an ordinary subroutine whose reference is passed around. The caller (who uses that function) doesn't neccessarily have an idea of which subroutine is getting invoked.
-derby
update: darn that jeffa. I think perlmonks needs an "oops I'm too slow" button.