Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^3: Communication between Windows and Linux via Perl

by perl514 (Pilgrim)
on Apr 12, 2013 at 12:30 UTC ( #1028355=note: print w/replies, xml ) Need Help??

in reply to Re^2: Communication between Windows and Linux via Perl
in thread Communication between Windows and Linux via Perl

Hi Salva,


Thank you for pointing that out. I have been using the module as shown in a tutorial posted here, but not sure where I am going wrong. I will be thankful if you could provide any pointers on how to use it correctly.

Perlpetually Indebted To PerlMonks

use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books"; is a boon for Windows.

Replies are listed 'Best First'.
Re^4: Communication between Windows and Linux via Perl
by salva (Abbot) on Apr 12, 2013 at 13:14 UTC
    Well, the truth it is a little tricky:

    First, you should loop until the eof method from Net::SSH2::Channel returns true.

    In order to not have a busy loop, you can use sock (that returns the socket used for the SSH connection) and block_directions (which tells one if Net::SSH2 needs to write or read from that socket) combined with select to wait for some activity on the SSH socket.

    Or you can just use Net::SSH::Any that will do all of that for you (or you can also look at its source code for inspiration).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028355]
[stevieb]: whale oil beef hooked... Strawberry just implemented a JSON structured Perls Available. That fits right in with what I've done with berrybrew quite well me thinks.
[choroba]: Good morning!
[stevieb]: morning, choroba

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2017-02-23 03:35 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (338 votes). Check out past polls.