http://qs321.pair.com?node_id=1224176


in reply to Re: email address as username
in thread email address as username

If I use single quotes, I get the error "Can't call method "login" on an undefined value at line x." Here's the relevant portion of the code:
use Net::FTP; my ($ftp, $host, $user, $pass, $dir, $fpath); $host = 'ftp.my.com'; $user = 'last.first@somewhere.com'; $pass = 'mypass'; $dir = '/my/file_path/onftp'; $fpath = 'myfileonserver_xml.zip'; $ftp = Net::FTP->new($host, Debug => 0); $ftp->login($user, $pass) || die $ftp->message; ##this is line x## $ftp->cwd($dir); $ftp->put($fpath) || die $ftp->message; $ftp->quit;