Help for this page

Select Code to Download


  1. or download this
    # Original code
    sub cmd {
    ...
        }
        ...
    }
    
  2. or download this
    my $ssh = Net::SSH::Perl->new(...);
    open my $outfh, ">", $filename
      or die "Couldn't create '$filename' : $!";
    binmode $outfh;
    $ssh->register_handler('stdout', sub { print $outfh $_[1]; });