Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: multiftp.pl

by cybear (Monk)
on May 24, 2002 at 18:54 UTC ( [id://169183]=note: print w/replies, xml ) Need Help??


in reply to multiftp.pl

ergowolf, What is it that you are doing with the message() statements?
Are you assigning somthing to it, or calling something from it?

On another note...
I have a script that FTP's a file to a VAN (Value-added Network).
Once the file transfer is complete an ILOG number is returned
from the VAN. This number 99.99999999% certifies that the file
was received correctly.

Currently, in order to capture that number, I need to turn
the debug on Net::FTP to 1 and redirect STDERR to a file.
 my $ftpSession = Net::FTP-> new("$host", Debug => 1); open (STDERR, ">>/detaillogfile.log");

Can you think of a better way?

Replies are listed 'Best First'.
Re: Re: multiftp.pl
by Anonymous Monk on May 07, 2003 at 17:14 UTC
    $ftp->message() is mentioned in the documentation - it returns the last line that was received from the server, so it would fit your purpose very nicely, read up the Net::FTP POD :)
      $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?)
        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
        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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://169183]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found