in reply to Re: Re: FTP Unix -> NT
in thread FTP Unix -> NT

If the server, username and password aren't changed very often, you might just try simplifying it down to:

#!/usr/bin/perl -w use strict; use Net::FTP; my $ftp = Net::FTP->new('216.74.109.245') or die "Server not found"; $ftp->login('username','password') or die $ftp->message(); #$ftp->binary(); $ftp->ascii(); # you probably want to send it as ASCII instead of bin +ary if it is a text file $ftp->cwd("/public_ftp") or die $ftp->message(); $ftp->get("mystuff.txt") or die $ftp->message(); $ftp->quit;

You will see that I removed the variables that you were using only once. I also let the Net::FTP session provide it's own error messages.