in reply to Net:FTP Not overwrite files
#!/usr/bin/perl use strict; use warnings; use Net::FTP::File; use constant HOST => 'ftp.perl.org'; use constant DIR => '/pub/CPAN'; use constant FILE => 'README'; my $ftp = Net::FTP->new(HOST, Debug => 1) or die "Couldn't connect: $@ +\n"; $ftp->login('anonymous'); $ftp->cwd(DIR); $ftp->put(FILE) unless $ftp->isfile(FILE); warn "File exists.\n"; $ftp->quit;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Net:FTP Not overwrite files
by alexm (Chaplain) on Jul 26, 2008 at 19:26 UTC | |
by lightman (Initiate) on Jul 24, 2009 at 14:14 UTC | |
by Sol (Initiate) on Nov 05, 2014 at 14:32 UTC |