I have this script below, where I want to download a pdf from a URL
#!/usr/bin/perl
use warnings;
use strict;
use LWP::Simple;
my $save = "C:\\Users\\rahard\\Desktop\\";
my $file = get 'http://locationoffile';
How can I save the pdf to the Desktop? (if I click the URL, it will pront me to save a random name file)
Thank you
/edit some syntax error in $save and edit $file location
Use
opento open a file handle and print to it. Also note that each backslash in$savemust be escaped.