Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl -w use Net::FTP; $hostname = 'remotehost.com'; $username = 'anonymous'; $password = 'myname@mydomain.com'; # Hardcode the directory and filename to get $home = '/pub'; $filename = 'TESTFILE'; # Open the connection to the host $ftp = Net::FTP->new($hostname); # Construct object $ftp->login($username, $password); # Log in $ftp->cwd($home),"\n"; # Change directory print $ftp->ls($home),"\n"; # Now get the file and leave $ftp->get($filename); $ftp->quit;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Saving FTP File
by Fletch (Bishop) on Feb 27, 2008 at 16:57 UTC | |
Re: Saving FTP File
by moklevat (Priest) on Feb 27, 2008 at 20:19 UTC |