I think that the first reply to your post was on target. I have looked at the Net::FTP doc's and this appears to be "spot on". I suspect that your problem is at a much higher level than just getting the file. First, you have to authenticate and get logged-on. Follow the steps below.
use Net::FTP;
$ftp = Net::FTP->new("some.host.name", Debug => 1)
or die "Cannot connect to some.host.name: $@";
$ftp->login("your_name",'password')
or die "Cannot login ", $ftp->message;
$ftp->cwd("remote_dir") #cwd at remote site may not
#be necessary depending upon your logon.
or die "Cannot change working directory ", $ftp->message;
$ftp->get("somefilename")
or die "get failed ", $ftp->message;
Wish you well... |