in reply to Rename/mkdir with File::Fetch
The documentation of File::Fetch suggests no way to specify the name of the output file. Since you already have the ID, I suggest creating a directory for each ID and saving the file there:
my $id = $ref->{document_id}; my $dir = "/data/documents/$id"; mkdir $dir or die $!; my $ff = File::Fetch->new(uri => $ref->{url}); $ff->fetch( to => $dir );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Rename/mkdir with File::Fetch
by justin423 (Scribe) on Sep 14, 2022 at 01:55 UTC |