HTML::PARSER issue

M

MoshiachNow

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("http://localhost:58080/yoho/admin");
close LINKLOG;
my $p = HTML::parser->new;
my $LINKTEXT = $p->parse_file("$WINDIR\\TEMP\\LINKLOG");
print $LINKTEXT ;
 
P

Paul Lalli

MoshiachNow said:
I get a URL contents into a file LINKLOG.
Then I want to parse it's contents and to print it.

print *what*? If you just want to print the HTML you just retrieved,
just open the file and print it, and forget the HTML::parser stuff. If
you want to print something else, you need to tell us what you want to
print. Provide example input and output. Have you read the Posting
Guidelines that are posted here twice a week?
Instead it prints the hash refernce...
Appreciate help.
thanks
========================================
open (LINKLOG,">$WINDIR\\TEMP\\LINKLOG");
select LINKLOG;
getprint("http://localhost:58080/yoho/admin");
close LINKLOG;

The above four lines can be shortened to one by using getstore()
instead of getprint()
my $p = HTML::parser->new;
my $LINKTEXT = $p->parse_file("$WINDIR\\TEMP\\LINKLOG");
print $LINKTEXT ;

What did you read that made you believe parse_file() returns anything
that would make sense to print?

Your post does not at all contain a description of what you actually
want to do. It is therefore not possible to help you to do it...

Paul Lalli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,289
Messages
2,571,435
Members
48,122
Latest member
GeneBiddle

Latest Threads

Top