it in a log file, you must make system calls instead of API calls

<<<< ^^^^^ >>>>

use Net::FTP;
use IO::Handle;

open (OUTPUT, ">output.txt") or die $!; open (ERROR, ">error.txt") or die $!;

STDOUT->fdopen(\*OUTPUT, "w") or die $!; STDERR->fdopen(\*ERROR, "w") or die $!;

$ftp = Net::FTP->new("some.host.name", Debug => 1); $ftp->login("anonymous",'me@here.there'); $ftp->quit;

That's 4 lines that nobody wants to see in any/all of their programs... the only issue is whether to support STDOUT and STDERR