Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2018-06-25 02:53 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.