Really?
Here's my code and I get no return results with it, but if I remove ( -f $entry->{a} ) I get the files and the directories ... I guess I could add regex condition as well, but I'd rather not
use Net::SFTP::Foreign;
my $hostname='my.server.com';
my $sftp = Net::SFTP::Foreign->new( $hostname , user=>"me" );
my @files = $sftp->find( '/data/dir',wanted => sub{ my $now = time();
my $yesterday = $now-(24*3600);
my (undef, $entry) = @_;
( ($entry->{a}->mtime < $now) and ($entry->{a}->mti
+me > $yesterday) and (-f $entry->{a} ) )
} );
|