shu has asked for the wisdom of the Perl Monks concerning the following question:
and the output is always giving meuse HTML::TokeParser; use HTML::TokeParser::Simple; require LWP::UserAgent; use HTML::Parser; use Data:umper; $ua = LWP::UserAgent->new; my $file="html_content.txt"; my $output_file="parsed_data.txt"; open(FH,">staff.txt"); my $url="http://www.accountancy.smu.edu.sg/facultystaff/faculty.htm"; $ARGV[0]=$url; print "Parsing $url\n\n"; $request = HTTP::Request->new('GET', $url); $response = $ua->request($request); if ($response->is_success) { print "response successful!\n\n"; print FH $response->content(); } else { print "bad luck! unsuccessful request\n\n"; } close (FH);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with LWP::UserAgent
by dws (Chancellor) on Feb 06, 2004 at 07:40 UTC | |
by PastisALo (Hermit) on Feb 06, 2004 at 08:48 UTC | |
|
Re: Help with LWP::UserAgent
by Corion (Patriarch) on Feb 06, 2004 at 07:36 UTC | |
|
Re: Help with LWP::UserAgent
by matthewb (Curate) on Feb 06, 2004 at 07:38 UTC | |
|
Re: Help with LWP::UserAgent
by pelagic (Priest) on Feb 06, 2004 at 08:06 UTC | |
|
Re: Help with LWP::UserAgent
by kalamiti (Friar) on Feb 06, 2004 at 09:32 UTC | |
|
Re: Help with LWP::UserAgent
by shu (Initiate) on Feb 06, 2004 at 09:05 UTC | |
by Corion (Patriarch) on Feb 06, 2004 at 09:08 UTC |