in reply to Re: Why SFTP copy_time doesn't work?
in thread Why SFTP copy_time doesn't work?

Hi Salva,

I used to the Foreign::Compat, but now I use the SFTP::Foreign again, just to use the "copy_time" params.

And now I use the "status" for get the return of get,put, rename.. not using the numeric values more but the string message.

Thank your for advicem, one more time ;o)

Replies are listed 'Best First'.
Re^3: Why SFTP copy_time doesn't work?
by salva (Canon) on Jan 11, 2007 at 17:11 UTC
    As I already told you, status does return a numeric value. Use the numeric operators to handle it:
    unless ($sftp->put(...)) { if ($r == SSX_FX2_...) { # do whatever } }

    But most important, checking the status value is useless after calling put or any other high level method!!!, You should be using $sftp->error instead.