in reply to Problem while FTP

Redirecting STDOUT to a file:
% your_ftp_prog.pl > your_log_file
Redirecting STDERR to a file:
% your_ftp_prog.pl 2> your_log_file
-- vek --

Replies are listed 'Best First'.
Re: Re: Problem while FTP
by graff (Chancellor) on Oct 27, 2002 at 05:14 UTC
    Or, to do that from within the perl script (since some shells don't support redirection of just STDERR):
    open(STDOUT, ">$my_log_file"); open(STDERR, ">$my_err_file");
    and of course you can double the angle brackets to append to the logs, rather than overwriting them on each run.