Help for this page

Select Code to Download


  1. or download this
    use Net::OpenSSH;
    
    ...
    $ssh->die_on_error("unable to connect to remote host");
    
    my ($out, $err) = $ssh->capture2(ls => '-l', $remotefile);
    
  2. or download this
    use Net::SFTP::Foreign;
    use Data::Dumper;
    ...
    
    my $attr = $sftp->stat($remotefile);
    print Dumper $attr;