Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use LWP::Simple; #use strict; #use warnings; my $url = 'http://website'; # get the HTML text my $content = get($url); if (not defined $content) { print "URL is not available.\n"; } else { print "Fetched data.\n"; } open(TMPFILE,">cony.html") || die "\nwrite failed: $!"; print TMPFILE "$content"; close TMPFILE; print "$content\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Not writing to my local file.
by hiseldl (Priest) on Aug 28, 2002 at 17:09 UTC | |
|
Re: Not writing to my local file.
by Ovid (Cardinal) on Aug 28, 2002 at 17:10 UTC | |
|
Re: Not writing to my local file.
by Snuggle (Friar) on Aug 28, 2002 at 17:21 UTC | |
|
Re: Not writing to my local file.
by Anonymous Monk on Aug 28, 2002 at 17:12 UTC |