u235sentinel has asked for the wisdom of the Perl Monks concerning the following question:
Dave Robins (the developer) mentioned I check out the POLL method to do something similar to this however I must be missing something. I've read perldoc however I'm not seeing where to call the subroutine from POLL. Here is the module I'm using Net-SSH2-0.09®ister_handler("STDERR", sub { my($channel, $buffer) = @_; print "** STDERR -- I received this: ", $buffer->byt +es; });
I've tried replacing 'pollerr' with STDERR and stderr. In both cases I get a message stating I can't use symbolic references. Only hard references are allowed.# Create the ssh2 object my $ssh2 = Net::SSH2->new(); # Create my STDERR trigger my $poll=Net::SSH2->poll( 1, 'pollerr'); # connect to remote server $ssh2->connect($server) or die "** Failed to connect via Net::SSH2: + $!\n"; print "** Connect to server $server successful\n\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Net::SSH2 to read remote STDERR channel
by zentara (Cardinal) on Oct 03, 2006 at 19:07 UTC | |
|
Re: Using Net::SSH2 to read remote STDERR channel
by Khen1950fx (Canon) on Oct 03, 2006 at 21:36 UTC |