#!/usr/bin/perl
use Net::FTP;
$ftp = Net::FTP->new("ftp.domain.com", Debug => 0);
$ftp->login('username','password');
$ftp->binary;
#or
$ftp->ascii;
$ftp->cwd("directory");
$ftp->put("/path/to/file.txt");
$ftp->quit;
You'll find most or all ftp commands worth perfectly through this module.