my $proto_class = join '::', __PACKAGE__, ($proto == PROTOCOL_SSH2 ? "SSH2" : "SSH1"); #### my $proto_class = $ssh->protocol_class($proto); #### $proto_class='Net::SSH::W32Perl::SSH2' #### $proto_class='Net::SSH::Perl::SSH2' #### use strict; use warnings; use Net::SSH::W32Perl; # Set $HOME (if not set), to avoid another Net::SSH::Perl bug... if(! $ENV{HOME}) { $ENV{HOME}='c:\\' }; my $ssh=Net::SSH::W32Perl->new('myhost.com'); $ssh->login('myuser', 'mypasswd'); my ($stdout, $stderr, $exit) = $ssh->cmd('uname -a; date; uname -a'); print STDERR "exit=$exit\n"; print STDERR "STDERR: $stderr\n" if $stderr; print STDERR "STDOUT: $stdout\n" if $stdout;