Category: FTP stuff
Author/Contact Info jjdeterick
Description: I'm new to perl, and this is one of my first attempts. I welcome any pointers on any easier/better ways to do this. Anyway, I hope this helps someone. Thanks, Enjoy
Author: jjdeterick                                     
Date: 1/31/00                                          
  This perl program will read a list of file names and
  get those files from a specified host.  The user    
  must first create a text list of the files to fetch 
  and enter the host, username, password and remote   
  directory that houses the files in the code.        
#!/usr/bin/perl -w
use Net::FTP;

$hostname = 'user defined';
$username = 'user defined';
$password = 'user defined';

$home = 'user defined';

# Open the FilesToGet.txt file which contains a list of files to be searched.
open(FilesToGet, ') { 
  $TheFile = $_;                         
  $INFILE = $TheFile;

  $ftp = Net::FTP->new($hostname);
  $ftp->login($username, $password);

  $ftp ->cwd($home),"\n";

  #get the file