Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^9: Perl sftp behavior when there are no files in the share

by Corion (Pope)
on Mar 28, 2013 at 12:55 UTC ( #1025957=note: print w/ replies, xml ) Need Help??


in reply to Re^8: Perl sftp behavior when there are no files in the share
in thread Perl sftp behavior when there are no files in the share

It seems there is a small error in the code by soonix. The Net::SFTP::Foreign documentation says that ->get takes the local name of the file as second parameter and the rest are options. So if you want to display the progress, you'll also have to provide the local name, for example like this:

... use File::Basename; my $local_name= basename( $REM_FILE ); warn "Saving '$REM_FILE' to '$local_name'"; $sftp->get($REM_FILE, $local_name, callback => \&show_progress) ...


Comment on Re^9: Perl sftp behavior when there are no files in the share
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2015-07-03 09:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (51 votes), past polls