Ankit.11nov has asked for the wisdom of the Perl Monks concerning the following question:
Hi there,
I just discovered the monks! I havent been a Perl programmer for a long time... its kind of new to me.
What I am trying to do? "Fetch webpage,convert to text and store it in a file"
On running the above code it is not giving any error , but it is not fetching any data from the webpage also.
Can you please help me out on this ? What could be the problem here?
I just discovered the monks! I havent been a Perl programmer for a long time... its kind of new to me.
What I am trying to do? "Fetch webpage,convert to text and store it in a file"
use LWP::Simple; use HTML::TreeBuilder; use HTML::FormatText; print "Opening the URL"; $URL=get("http://www.yahoo.com/"); $Format=HTML::FormatText->new; $TreeBuilder=HTML::TreeBuilder->new; $TreeBuilder->parse($URL); $Parsed=$Format->format($TreeBuilder); open FILE_OUT , '>D:\Profiles\in2228c\Desktop\info.txt'; print FILE_OUT "$Parsed"; close FILE_OUT; exit;
On running the above code it is not giving any error , but it is not fetching any data from the webpage also.
Can you please help me out on this ? What could be the problem here?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Fetching Web Page and covert to text
by Utilitarian (Vicar) on Jul 16, 2009 at 11:37 UTC | |
by Ankit.11nov (Acolyte) on Jul 16, 2009 at 11:52 UTC | |
by Utilitarian (Vicar) on Jul 16, 2009 at 12:39 UTC | |
by Crian (Curate) on Jul 16, 2009 at 12:17 UTC | |
Re: Fetching Web Page and covert to text
by apl (Monsignor) on Jul 16, 2009 at 14:04 UTC | |
by Ankit.11nov (Acolyte) on Jul 17, 2009 at 05:33 UTC | |
by apl (Monsignor) on Jul 17, 2009 at 13:03 UTC |
Back to
Seekers of Perl Wisdom