# untested again! my $sftp = $ssh2->sftp; my $dh = $sftp->opendir($dir); while (my %e = $dh->read) { print "$e{name}\n"; }