thanks
I prefer using the stdin_data route.
somehow it is not doing it:
this is the code:
$ssh->error and
die "Couldn't establish SSH connection: ". $ssh->error;
my $output = $ssh->capture(stdin_data => <<'EOS', '/usr/bin/perl');
use File::Find::Rule;
my $today = time();
my $onehour = $today - (60*60);
my @files = File::Find::Rule->file()
->name("*.0")
->mtime("<$onehour")
->in( "/mypath/" );
for my $file (@files) {
print "$file\n";
}
EOS
the scripts outputs this:
bash: line 15: stdin_data: command not found
I do not understand what bash has to do here since we are full perl.
thanks in advance for the coop.