Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML::PARSER issue 1

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Joined
Feb 6, 2002
Messages
1,851
Location
IL
HI,
I get a URL contents into a file LINKLOG.
Then I want to parse it's contents and to print it.
Instead it prints the hash refernce...
Appreciate help.
thanks
========================================
open (LINKLOG,">$WINDIR\\TEMP\\LINKLOG");
select LINKLOG;
getprint("close LINKLOG;
my $p = HTML::Parser->new;
my $LINKTEXT = $p->parse_file("$WINDIR\\TEMP\\LINKLOG");
print $LINKTEXT ;


Long live king Moshiach !
 
Mosiach

Code:
use Data::Dumper;
print Dumper($LINKTEXT);
and see what you get. Normally you'd use lower case for variable names, too.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::PerlDesignPatterns)[/small]
 
HTML::Parser is a pretty difficult module to use. I'd suggest opting for something like HTML::TokeParser::Simple, which is far easier.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top