in reply to Re^2: Need alarm while getting error on SFTP
in thread Need alarm while getting error on SFTP

Next time, try searching the documentation of the module you're actually using: Net::SFTP::Foreign:
timeout => $seconds

when this parameter is set, the connection is dropped if no data arrives on the SSH socket for the given time while waiting for some command to complete.

When the timeout expires, the current method is aborted and the SFTP connection becomes invalid.

Note that the given value is used internally to time out low level operations. The high level operations available through the API may take longer to expire (sometimes up to 4 times longer).

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^4: Need alarm while getting error on SFTP
by ravi45722 (Pilgrim) on Dec 03, 2015 at 11:37 UTC

    I am trying to get the list of remote server folder. For that I am using

     my $ls = $sftp->ls('/root/sanjay/');

    But its printing all the files including .*.swp files. So I tried to filter on ".c" files & tried like this

     my $ls = $sftp->ls('/root/sanjay/*.c');

    But not succeeded. How to get on ".c" files through that ???

      Have you read the documentation of Net::SFTP::Foreign for the ls method? It shows how to achieve what you want.

        actually, what the OP needs is the glob method.

        Ya, I read that. Its showing on some wanted & unwanted methods. I tried it too. But not succeeded.

Re^4: Need alarm while getting error on SFTP
by ravi45722 (Pilgrim) on Dec 03, 2015 at 11:27 UTC

    Thanks for reply.

    How to give timeout condition in this module like below??

    I know that is a other module. I showing that just as an example for timeout condition. That's why i mentioned In this module like below