Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: OpenSSH capture perl-command

by salva (Abbot)
on Mar 15, 2014 at 07:16 UTC ( #1078426=note: print w/replies, xml ) Need Help??

in reply to OpenSSH capture perl-command

The command argument to Net::OpenSSH methods must be a system command (e.g. ls, grep, etc.). You can not pass perl code there.

In your particular case, you can use SFTP to query the remote filesystem:

use Data::Dumper; my $sftp = $ssh->sftp; my $stat = $sftp->stat($remote_file); print Dumper($stat), "\n";

Replies are listed 'Best First'.
Re^2: OpenSSH capture perl-command
by Alasharin (Initiate) on Mar 17, 2014 at 10:27 UTC

    Regards, Armin </>

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1078426]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-06-29 11:23 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (660 votes). Check out past polls.