Problems? Is your data what you think it is? | |
PerlMonks |
Why is this link parser only working the first time?by dave_aiello (Pilgrim) |
on Jan 19, 2001 at 06:03 UTC ( [id://52910]=perlquestion: print w/replies, xml ) | Need Help?? |
dave_aiello has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to write a link parser that takes a URL and returns an array of links on the page that are within in the /attachments sub tree of a Web server's document tree. The subroutine parse_page works fine if it is only called one time. Subsequent invocations of the subroutine within the same program return nothing in the array, although I am sure that there are links that meet the criteria. What I want to do is set up a main subroutine which grabs URLs from a database table, passes them one at a time to parse_page, and receives back a corresponding array of links. And to be perfectly clear, I want to do this serially. I'm sorry if I have done something stupid. I have been sick all week, and I am working on less than my normal powers of abstract reasoning and concentration. I shamelessly leveraged the example code in the perldoc for HTML::LinkExtor and squinted at the screen for a while to get this far.
Dave Aiello
Back to
Seekers of Perl Wisdom
|
|