Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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]
erix .oO( apparently but does not GotToBFast )
[Discipulus]: now i must come back to my house/hoven monks: dont do interesting discussion in my absence!
[erix]: or apparently, now it does :)
[GotToBTru]: heh
erix prods ambrus to (re-)start cbstream...
[GotToBTru]: I've got a program with an if ... or ... statement with 80 clauses
[stevieb]: 80 clauses? dispatch table?
[GotToBTru]: no, lookup

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2017-06-22 12:56 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (519 votes). Check out past polls.