Posted on 2007-07-19 18:10:18-07 by yeddish in response to 5752
Re: I'm having a little problem
I have modified my code to include the changes that you mentioned but I still seem to get the same result. I just can't seem to figure out where my problem lies. Here's my new code:

use LWP::Simple; use HTML::TreeBuilder::XPath; my $tree= HTML::TreeBuilder::XPath->new; $html = get("http://moneycentral.msn.com/investor/invsub/results/compare.asp?Page=TenYearSummary&Sy +mbol=WHT"); $tree->parse_file($html); $xpath = '/html/body/div[@id="wrapper"]'; print "$html\n"; #This prints the HTML just fine if ($tree->exists($xpath)) { print "$xpath: Exists!\n"; } else { print "$xpath: Doesn't exist!\n"; }

Thanks.
-Joel
Direct Responses: 5771 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.