I know this kind of question has been asked before, but I think I may have got lost trying to understand the examples provided in the responses. So I am asking it here again.
I have to collect list of files(absolute filenames only) from a particular folder on a remote machine.
On my Linux machine:
opendir - works locally. I want it to work remotely.
use Net::FTP - works but FTP disabled.
use Net::SFTP - could work but this Net::SFTP not installed.
I want some way to get this info considering that I have to make use of either sftp or ssh.
my $cmd = "ssh user\@host 'find x/y/z -type f'";
my @expectedOutputHere = system($cmd);
But $expectedOutputHere doesn't contain the list of files(as output).
Once I have the output I am planning to use File::Basename::basename to get absolute names. But how do I first collect the output in an array?