Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 wandering the Monastery: (11)
As of 2014-11-27 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (186 votes), past polls