Collaborate wrote:
I am wondering if there is a way to copy a webpage to a text file using Perl.

    use LWP::Simple;
    my $url = 'http://www.example.com/';
    open my $fh, '>', 'webpage.txt' or die $!;
    print $fh get $url;

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to