Hi all,
At the first place, I used the following code to check if LWP::Simple has been installed
eval "use LWP::Simple";
if ($@) {
print "LWP installed\n";
} else {
print "LWP not installed\n";
}
Once I runned this code, it said "LWP installed"
Then I runned another code
use LWP::Simple;
$url = 'getstore($url, "g.html"
;
if (-e "g.html"
{
$size = (stat('g.html'))[7];
print "size - $size\n";
unlink './g.html';
} else {
print "g.html - not exist";
}
There was an error said
"Can't locate LWP/Simple.pm in @INC (@INC contains:/usr/lib/perl5/5.005/i386-linux /usr/lib/perl5/5.005 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl /usr/lib/perl5) at x.pl line 3
BEGIN failed--compilation aborted at x.pl line3"
I don't know what's wrong. Any suggestion?? Thanks.
At the first place, I used the following code to check if LWP::Simple has been installed
eval "use LWP::Simple";
if ($@) {
print "LWP installed\n";
} else {
print "LWP not installed\n";
}
Once I runned this code, it said "LWP installed"
Then I runned another code
use LWP::Simple;
$url = 'getstore($url, "g.html"
if (-e "g.html"
$size = (stat('g.html'))[7];
print "size - $size\n";
unlink './g.html';
} else {
print "g.html - not exist";
}
There was an error said
"Can't locate LWP/Simple.pm in @INC (@INC contains:/usr/lib/perl5/5.005/i386-linux /usr/lib/perl5/5.005 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl /usr/lib/perl5) at x.pl line 3
BEGIN failed--compilation aborted at x.pl line3"
I don't know what's wrong. Any suggestion?? Thanks.