Installing: LWP
username@ubuntu:~$ sudo perl \
-MCPAN -e 'install Bundle::LWP'
Once you install Bundle::LWP
, you can test it out the code by
#!/usr/bin/perl -w
use strict;
use warnings;
use LWP::Simple;
my $url = 'http://www.google.com/';
my $content = get $url;
die "Couldn't get $url" unless defined $content;
print $content;
Update: Probably you might want to do this first
sudo perl -MCPAN -e shell
cpan> install Bundle::CPAN
cpan> reload cpan
No comments:
Post a Comment