############################################################ # FTP_FILE - Send a file to FTP host # Requires: use Net::FTP; # Perl module for FTP access # Arguments: $sendFile - file to be sent (full path) # $name - file to be named on remote server # $host - FTP host name (ftp.japh.org) # $user - FTP login user name # $pass - FTP login password # Returns: none ############################################################ sub ftp_file { local ($sendFile, $name, $host, $user, $pass) = @_; # Pass file +name to send $ftp = Net::FTP->new($host); # Open the host $ftp->login($user,$pass); # Username and password $ftp->put($sendFile, $name); # Send the file, rename $ftp->quit; # Quit } ####################### END SUBROUTINE #####################
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple FTP
by mikeB (Friar) on Jul 11, 2001 at 01:52 UTC | |
|
Re: Simple FTP
by Cirollo (Friar) on Jul 11, 2001 at 18:27 UTC |