I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-07-19 05:27:22-07 by mirod in response to 5751
Re: I'm having a little problem

parse_file doesn't do what you think it does. Instead it does what it says, it parses a file ;--). So HTML::TreeBuilder::XPath looks for a file named 'http://moneycentral.msn.com/investor/invsub/results/compare.asp?Page=TenYearSum' and doesn't find it, hence returning a quasi empty tree (the html, head and body elements).

You need to load the HTML yourself, for example by using LWP::Simple, and doing this:

tree->parse_file( get "http://moneycentral.msn.com/investor/invsub/results/compare.asp?Page=TenYear +Summary&Symbol=WHT");

Does this help?

Direct Responses: 5755 | 5760 | Write a response