Nifty Perl module
that lets you automate
tasks (talking to the "ftp
usually doesn't work, because you need to parse the output carefully, and it's a bit different on every platform
). Very easy to get the hang of:
- Open a connection:
my $ftp = Net::FTP->new($host) or die "$0: $@\n";
- Anonymous login (you can specify a name, of course):
$ftp->login or die "$0: $@\n";
- Go to your desired directory:
$ftp->cwd('/pub/xxx/pix/') or die "$0:$@\n"
- Get your file:
$ftp->get($filename) or die "$0: $@\n"
Bear in mind that *you* can read the transfered files, directory listings, etc.; this makes for a very powerful tool!