justin423 has asked for the wisdom of the Perl Monks concerning the following question:
my $query = "select url FROM LINKS"; # << minor edit my $sth = $dbh->prepare($query) or die "prepare: ".$dbh->errstr; $sth-> execute() or die "execute: ".$dbh->errstr; $i=0; while (my $ref = $sth->fetchrow_hashref()) { print "\nurl: $ref->{url}\n"; my $ff = File::Fetch->new(uri=>$ref->{url}); my $where = $ff->fetch( to => '/data/documents/'); my $error= $ff->error(); rename ("C:/data/documents/document.pdf","C:/data/documents/document$i.pdf"); ($i++); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Rename/mkdir with File::Fetch
by hippo (Archbishop) on Aug 10, 2022 at 16:06 UTC | |
by justin423 (Scribe) on Aug 10, 2022 at 16:53 UTC | |
|
Re: Rename/mkdir with File::Fetch
by Corion (Patriarch) on Aug 10, 2022 at 15:26 UTC | |
by justin423 (Scribe) on Sep 14, 2022 at 01:55 UTC | |
|
Re: Rename/mkdir with File::Fetch
by Anonymous Monk on Aug 10, 2022 at 20:37 UTC | |
by afoken (Chancellor) on Aug 11, 2022 at 21:22 UTC | |
by Anonymous Monk on Aug 12, 2022 at 08:25 UTC |