$ff->output_file
The name of the output file. This is the same as $ff->file, but any query parameters are stripped off. For example:
http://example.com/index.html?x=y
would make the output file be index.html rather than index.html?x=y.
####
my $ff = File::Fetch->new(uri => $url);
my $output_name = $ff->name;
$ff->file =~ /name=(.*)$/ and $output_name = $1;
# $output_name is now 'v2_ITA_12-Seiter_Programm_1207_web.pdf'
$ff->output_file( $output_name );
####
my $ff = File::Fetch->new(uri => $url);
say "scheme: " . $ff->scheme;
say "host: " . $ff->host;
say "path: " . $ff->path;
say "file: " . $ff->file;
say "output_file: " . $ff->output_file;
## outputs:
Use of uninitialized value in concatenation (.) or string at ./foo.pl line 12.
scheme:
host: http:
path: //www.ekey.net/
file: downloads-475?download=2132cbe2-2fb1-eeff-583c-50a39b6aba6c&name=v2_ITA_12-Seiter_Programm_1207_web.pdf
output_file: downloads-475