> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf Of Tom Phoenix
> Sent: Tuesday, December 11, 2007 15:07
> To: Wagner, David --- Senior Programmer Analyst --- WGO
> Cc: beginners@perl.org
> Subject: Re: timeout in ftp
> 
> On 12/11/07, Wagner, David --- Senior Programmer Analyst --- WGO
> <[EMAIL PROTECTED]> wrote:
> 
> > I have the following code:
> >
> >     $MyFTP->put($MyFtpFromFile , $MyFtpToFile );
> >         if ( ! $MyFTP->ok() ) {
> 
> Are you using Net::FTP? Does your version of the documentation for
> Net::FTP mention an ok() method? I don't see one here:
> 
>     http://perldoc.perl.org/Net/FTP.html
> 
        Within Net is Cmd  which is from Graham Barr and from that
processing is where I am pulling the ok() as 
ok ()
    Returns non-zero if the last code value was greater than zero and
less than 400. This holds true for most command servers. Servers where
this does not hold may override this method.

        I use it throughout my code and I may very well be using
incorrectly, but it does catch invalid logon and other related actions
from ftp. So I can try the 

        if ( true ) { print in failure on put, msg code, etc }

but thought it could be used in this way from the doc.

Wags ;)

> It doesn't seem that you're using the module in the same way it's done
> in the documentation. As I read things, using the return value from
> the put() method as a Boolean value is the (only?) way to check for
> success. Is that the problem?
> 
> Good luck with it!
> 
> --Tom Phoenix
> Stonehenge Perl Training
> 

**********************************************************************
This message contains information that is confidential and proprietary to FedEx 
Freight or its affiliates.  It is intended only for the recipient named and for 
the express  purpose(s) described therein.  Any other use is prohibited.
**********************************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


  • timeout in ftp Wagner, David --- Senior Programmer Analyst --- WGO
    • Re: timeout in ft... Tom Phoenix
      • RE: timeout i... Wagner, David --- Senior Programmer Analyst --- WGO

Reply via email to