in reply to Re^2: Find a specific word in a text file
in thread Find a specific word in a text file

Be sure to do as is described in the POD for LWP::Simple: Check your return values for success.

my $page = get("http://www.whoever.de"); die "Couldn't get the page!\n" unless defined $page;

It could be that you're not even succeeding in fetching the page. Next, dump $page into a text file where you can examine it later to see if it really contains the text you're looking for (without any line-breaks, etc). If your HTML parsing needs get fairly elaborate, you might want to look at HTML::TokeParser anyway; use a powertool when a powertool is needed.


Dave

Replies are listed 'Best First'.
Re^4: Find a specific word in a text file
by algonquin (Sexton) on Sep 11, 2004 at 10:59 UTC
    Thanks for your help Dave. TokeParser was a great Idea. It took a while but I got it working now. Thx.