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

Re: How to print list using Net::SFTP::Foreign

by keszler (Priest)
on Oct 03, 2013 at 02:49 UTC ( #1056711=note: print w/replies, xml ) Need Help??

in reply to How to print list using Net::SFTP::Foreign

Adding use strict; at the beginning of your script (and fixing everything it subsequently complains about) would likely have pointed you directly at the problem.

According to Net::SFTP::Foreign, $sftp->ls($remote, %opts):

Returns a reference to a list of entries. Every entry is a reference to a hash with three keys: ...
Thus, your
# List remote directory contents @$remotefiles=$sftp->ls($remotedir);
should not have the @ in front of $remotefiles.

Replies are listed 'Best First'.
Re^2: How to print list using Net::SFTP::Foreign
by TCM (Acolyte) on Oct 07, 2013 at 13:47 UTC
    Thank you for the reply keszler, it worked. Thank you also for the user strict information. I really appreciate you taking the time to help me out!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2016-10-24 13:48 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (306 votes). Check out past polls.