Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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.

Comment on Re: How to print list using Net::SFTP::Foreign
Select or Download Code
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 browsing the Monastery: (2)
As of 2015-11-25 03:57 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (670 votes), past polls