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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: email address as username
by Marshall (Canon) on Oct 17, 2018 at 21:23 UTC | |
Re^3: email address as username
by poj (Abbot) on Oct 17, 2018 at 19:02 UTC | |
by nateh (Initiate) on Oct 17, 2018 at 19:18 UTC | |
Re^3: email address as username
by Happy-the-monk (Canon) on Oct 17, 2018 at 19:23 UTC |
In Section
Seekers of Perl Wisdom