Im trying to mirror a directory on my computer with another directory
with Net FTP. Below is the code im using. Im new to perl and new to
Net::FTP so any help would be great!


use Net::FTP;
use File::Basename;
my $ftp;
my $host ='example.com';
my $user ='example';
my $dir = "public_html/images/images/";
my $pw   ='blabal';
my $folder_to_mirror_my_machine = "99";
chomp($host,$user,$pw, $file_to_get);
$ftp=Net::FTP->new($host);
$ftp->login($user,$pw) or die "could not login";
$ftp->cwd($dir);
$ftp->ascii;
$ftp->put($folder_to_mirror_my_machine) or die "Can't put $file into
$dir\n";
$ftp->site("chmod 600 " . basename($folder_to_mirror_my_machine));


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to