I am using File::Fetch in a Perl script. How can I get File::Fetch to store a file to be downloaded in a specified file?
I have tried:
use File::Fetch;
my $ff = File::Fetch->new( uri => 'http://stackoverflow.com/users/63550');
#my $where = $ff->fetch() or die $ff->error; #Creates a file named "63550".
my $where = $ff->fetch( to => 'SO.html' ); #Creates a subfolder named SO.html with a file named "63550" in it.
A work-around would be to rename the file after download, but I wonder if it is possible to specify the file name immediately.
Test platform: ActiveState Perl 64 bit. Windows XP. From perl -v: v5.10.0 built for MSWin32-x64-multi-thread Binary build 1004 [287188] provided by ActiveState.