blob: 81544236b68ade270a0eabe01a27da17fb201cb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
|