sub FTP_Get_File {
my ($hostname,$remote_file)=@_;
my $filename = basename($remote_file);
my $ftp;
$ftp = Net::FTP->new($hostname, Debug => 0)
or die "Cannot connect to $hostname: $@";
#Please modify the login
$ftp->login("ora9i",'ora9i') or die "Cannot login ", $ftp->message;
#$ftp->cwd("$remote_file") or die "Cannot change working directory ", $ftp->message;
$ftp->get($remote_file,$filename)
or die "get the romote file $remote_file failed ", $ftp->message;
$ftp->quit;
}
or die "Cannot connect to $hostname: $@";
#Please modify the login
$ftp->login("ora9i",'ora9i') or die "Cannot login ", $ftp->message;
#$ftp->cwd("$remote_file") or die "Cannot change working directory ", $ftp->message;
$ftp->get($remote_file,$filename)
or die "get the romote file $remote_file failed ", $ftp->message;
$ftp->quit;
}