#!/usr/bin/perl
use warnings;
use strict;
use Net::FTP;
my $host="yourIP";
my $usr="yourUsr";
my $pass="yourPass";
my $path="/yourPub";
my $newerr=0;
my $ftp = Net::FTP->new($host,Debug =>0) or die "Cannot connect to $host: $@";
$ftp->login($usr,$pass) or die "Cannot login ", $ftp->message;
$ftp->cwd($path) or die "Cannot change working directory ", $ftp->message;
$ftp->get("test.file") or die "get failed ", $ftp->message;
$ftp->quit;
文章標籤
全站熱搜
留言列表