If this is from a Linux/UNIX box, definitely 
investigate rsync. If it is something like 
win98, this should work:

>>>>>START>>>>>
#!c:\perl\bin\perl.exe -wuse Net::FTP;use Term::ReadKey;my $host = "192.168.1.1";my $username = "user";my $timeout = 5;my $passive = 1;print "Password? ";ReadMode 2;my $password = <>;ReadMode 0;chomp($password);print "\n";my $directory = "/home/user/file/destination/directory";my $localdir = "c:\\file\\source\\directory";print "Connecting via FTP to host $host, timeout in $timeout seconds.\n";my $ftp = Net::FTP->new($host, 'Passive' => $passive, 'Timeout' => $timeout);if (! $ftp) { die "Cannot create new FTP session to host $host.\n"; }print "Logging in as user $username.\n";$result = $ftp->login($username, $password);if (! $result) { die "Cannot login to host $host as user $username with given password.\n"; }print "Changing to directory $directory.\n";$result = $ftp->cwd("$directory");if (! $result) { die "Cannot change directory on host $host.\n"; }print "Setting transfer mode to binary.\n";$result = $ftp->binary();if (! $result) { die "Cannot change transfer mode on host $host.\n"; }print "Getting list of files on server.\n";@ftpfilenames = $ftp->ls('*.tgz');@filelookup{@ftpfilenames} = (1) x @ftpfilenames;print "Gathering list of local files to transfer.\n";$result = opendir(D, $localdir);if (! $result) { die "Cannot open directory $localdir to read filenames.\n"; }@filenames = readdir(D);$result = closedir(D);if (! $result) { die "Error closing directory $localdir after reading.\n"; }chomp(@filenames);@filenames = grep { /^[^.]/ } @filenames;@filenames = grep { ! $filelookup{$_} } @filenames;print "\n";foreach $file (@filenames){	$result = $ftp->put($localdir."\\".$file);	if ($result) { print "$file \t- transfer succeeded.\n";	}	else { print "$file \t- transfer failed.\n"; }}if (scalar(@filenames) < 1){ print "All files are syncronized with the server, no transfer necessary.\n"; }$result = $ftp->quit;if ($result) { print "\nFTP session ended successfully.\n"; }else { print "FTP session ended with an error: $!\n"; }print "\nPress enter to exit";my $garbage = <>;print $garbage;<<<<<<END<<<<<<

Don't mistake this for a secure transfer method,
and constructive criticism is always appreciated.

Good luck,

Troy

>>> clay at fandre.com 05/20/02 11:47AM >>>
On Mon, 20 May 2002, Erik V. Anderson wrote:
> Quoting jasonandmissy at cableone.net: 
> > I am writing a perl script that ftp's the contents of a directory a couple of
> > times a day.  I loaded net::ftp and I can ftp by the exact file name.  How
> > would I ftp the whole directory or is mput supported with any perl module?
> One thing you might think about doing is tar/gz'ing the directory before you 
> ftp it.  By doing this, you are killing two birds with one stone:  you are 
> cutting down on the bandwidth needed to transfer the file and you are also 
> doing away with the need to mput or mget.
> -Erik

The problem with this is you are transferring EVERYTHING each time.
Use rsync which only transfers the bits that change. Plus it
automatically compresses on the fly. And it can use ssh too. Check out
the rsync exmaples page for some other cool uses for rsync:
http://www.samba.org/rsync/examples.html