summaryrefslogtreecommitdiffstats
path: root/ftpsend.pl
diff options
context:
space:
mode:
Diffstat (limited to 'ftpsend.pl')
-rw-r--r--ftpsend.pl23
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;