in reply to How can I retrieve a file from a UNIX server using Perl on a Windows NT client?
Looks pretty easy.use Net::FTP; $ftp = Net::FTP->new("some.host.name", Debug => 0) or die "Can't FTP to some.host.name: $@\n"; $ftp->login("anonymous",'me@here.there') or die "Anonymous access denied!\n"; $ftp->cwd("/pub") or die "Can't chdir to remote /pub.\n"; $ftp->get("that.file"); or die "Can't fetch that.file.\n"; $ftp->quit;
Edit 2001-03-11 by tye to add error checking. tye is quite disappointed that Net::FTP does not give you access to the reasons for any failures other than of new().
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How can I retrieve a file from a UNIX server using Perl on a Windows NT client?
by scottstef (Curate) on Mar 11, 2001 at 21:32 UTC | |
by tye (Sage) on Mar 12, 2001 at 03:22 UTC |