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

Re: Not getting List of files from Net::SFTP::Foreign

by syphilis (Canon)
on Sep 03, 2013 at 04:19 UTC ( #1052008=note: print w/ replies, xml ) Need Help??


in reply to Not getting List of files from Net::SFTP::Foreign

You haven't checked to see whether the Net::SFTP::Foreign->new(...) call succeeded. If it fails, then $sftp won't be a hash reference.
You don't appear to have passed the password on. Do you need to ?

The documentation recommends using $ftp->error() to check that the new() call has succeeded:

$sftp = Net::SFTP::Foreign->new($host); $sftp->error and die "unable to connect to remote host: " . $sftp->err +or;
Cheers,
Rob


Comment on Re: Not getting List of files from Net::SFTP::Foreign
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2015-07-02 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (45 votes), past polls