returns a list of directory entries, each of which is a reference to a hash as described in the previous paragraph.
Where the previous paragraph says:
a hash with three keys: filename, the name of the entry in the directory listing; longname, an entry in a "long" listing like ls -l; and a, a Net::SFTP::Attributes object, which contains the file attributes of the entry (atime, mtime, permissions, etc.).
So, if you want to assign to a hash, you need to dereference first:
for my $remote_file ($sftp->ls('.')) { my %details = %$remote_file; print $details{filename}, "\n"; }
To visualize the whole structure, use Data::Dumper:
use Data::Dumper; for my $remote_file ($sftp->ls('.')) { print Dumper($remote_file); }
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
In reply to Re: Using Net::SFTP
by choroba
in thread Using Net::SFTP
by slugger415
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |