Perhaps you missed the "WWW::Mechanize" in the subject? The original poster is already using Mechanize, and already has had the document parsed using proper means under the hood, and the question was about using find_links properly.
Thus, a solution to abandon all that seems crazy. That's the craziness I was pointing out.
| [reply] |
Dear Merlyn,
Oh- I see what you mean, but no, I didn't miss the subject line. Thank you for noticing that as a possibility.
Perhaps it is because I'm new to this board that I don't understand the standardizations that have been universally adopted here - but I code according to the original perl philosophy of tmtowtdi, and the actual question asked I need to extract the last link (and only the last link) which contains the image. Is there a way to do this which I'm not seeing? is the one to which I was responding.
Best, -Adam
| [reply] |
The above exchange over how to parse html seems to be a running controversy in the monastery.
At Being a heretic and going against the party line,
browseruk criticizes "cargo cult" reliance on html::tokeparser, html::treebuilder, and other html::* modules when regexes would do fine, and also because the html::s are hard to learn and don't deserve the praise the community gives them:
This was in reply to Parsing HTML tags with regex, which is a good starting thread for various methods of parsing html, including browseruk's simple regex solution, which led to all the controversy after he got downvoted. | [reply] |