Nifty Perl module that lets you automate common FTP tasks (talking to the "ftp" command 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:
  1. Open a connection:
    my $ftp = Net::FTP->new($host) or die "$0: $@\n";
  2. Anonymous login (you can specify a name, of course):
    $ftp->login or die "$0: $@\n";
  3. Go to your desired directory:
    $ftp->cwd('/pub/xxx/pix/') or die "$0:$@\n"
  4. 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!

Log in or register to write something here or to contact authors.