in reply to Re^3: user net:openSSH and File::find::Rule together.
in thread user net:openSSH and File::find::Rule together.
could the contents of the data feed by stdin_data we put in a subroutine instead..
I tried to put it in a subroutine like this:then call the subroutine:sub finder { use File::Find::Rule; my $today = time(); my $onehour = $today - (60*60); my @files = File::Find::Rule->file() ->name("*.0") ->mtime("<$onehour") ->in( "/export/home/adm_garcimo" ); for my $file (@files) { return $file; } }
but it does not find the subroutine..my $output = $ssh->capture({stdin_data => <<'EOS'}, '/usr/bin/perl'); finder() EOS print $output
thanks again.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: user net:openSSH and File::find::Rule together.
by salva (Canon) on Feb 15, 2018 at 18:39 UTC |