Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-12-28 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls