diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-08-08 18:26:22 +0200 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-08-08 18:26:22 +0200 |
commit | 4734af65b189af42ba656c8b43acd63f2f25f2e8 (patch) | |
tree | 41bed9b8b2fe532a949841289c3d806d03726f5e | |
parent | on e la (diff) | |
download | dotfiles-4734af65b189af42ba656c8b43acd63f2f25f2e8.tar.gz dotfiles-4734af65b189af42ba656c8b43acd63f2f25f2e8.tar.bz2 dotfiles-4734af65b189af42ba656c8b43acd63f2f25f2e8.tar.xz dotfiles-4734af65b189af42ba656c8b43acd63f2f25f2e8.tar.zst dotfiles-4734af65b189af42ba656c8b43acd63f2f25f2e8.zip |
add ftpsend
-rw-r--r-- | ftpsend.pl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ftpsend.pl b/ftpsend.pl new file mode 100644 index 0000000..8154423 --- /dev/null +++ b/ftpsend.pl @@ -0,0 +1,23 @@ +use strict; +use warnings; +use Net::FTP; + +my ($ftp, $host, $user, $pass); + +$host = "saladslab.karabo.ga"; +$user = ""; +$pass = ""; +$ftp = Net::FTP->new("saladslab.karabo.ga", Debug => 0) + or die "cant connect"; +$ftp->login($user, $pass) + or die "cant login"; +$ftp->cwd("saladslab") + or die "cwd failed"; +foreach my $f ($ftp->ls()) { print "$f\n" } + +foreach my $file (@ARGV) +{ + $ftp->put("$file", "$file") + or die "cant put $file\n", $ftp->message; +} +$ftp->quit; |