#!/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;
In reply to Saving FTP File by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |