in reply to Re: Re: multiftp.pl
in thread multiftp.pl

$ftp->message() grabs the last line STDOUT, but not the previous lines, nor STDERR... I'm trying to do the same thing...debug a troublesome FTP connection, and I'd like everything Debug -> 1 can give me. any way to redirect STDOUT and STDERR to a hash? (or a pair of them?)

Replies are listed 'Best First'.
Re^4: multiftp.pl
by Anonymous Monk on Jul 23, 2004 at 05:45 UTC
    Is there by any chance we can get the return value of the FTP requests that we send to an FTP server ? Eg: 1->Success and 0->Failure
Re^4: multiftp.pl
by skiboy (Sexton) on Oct 17, 2004 at 13:36 UTC
    One thing I do to read all my Perl code errors is to create a simple log file at the begining of the code. (STDERR, ">err_log.txt"); Plus a one for the standard good out put. (STDOUT, ">log.txt"); I need log files for all my transmissions since I work with mortgage companies and need to keep records of all transmissions. This was real helpful in troubleshooting FTP problems for me. The error log normally will not have any thing in it unless there is a fatal error in the FTP logic or Perl code. I'm by no means even close to an expert so my solutions are simple. Hope is helps. Ski