F
funkyville
All I need my script to do is go to a website and download a .pdf from
that site and save it to my hard drive. Example,
http://www.anysite.com/report.pdf
How do I do it?
I've searched for hours (groups, CPAN, etc.) and can't find anything.
For a normal html page I would just do something like this:
use LWP::Simple;
my $url;
my $content;
$url = "http://www.yahoo.com";
$content = get($url);
#then save
open(FILE, ">>C:/temp/new.html") || die "$!";
print FILE $content;
close(FILE);
This approach won't work with PDFs.
Does anyone know what to do?
Do I need special modules? What am I missing?
Thanks.
that site and save it to my hard drive. Example,
http://www.anysite.com/report.pdf
How do I do it?
I've searched for hours (groups, CPAN, etc.) and can't find anything.
For a normal html page I would just do something like this:
use LWP::Simple;
my $url;
my $content;
$url = "http://www.yahoo.com";
$content = get($url);
#then save
open(FILE, ">>C:/temp/new.html") || die "$!";
print FILE $content;
close(FILE);
This approach won't work with PDFs.
Does anyone know what to do?
Do I need special modules? What am I missing?
Thanks.