############################################################ # 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 filename 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 #####################