Hello monks,
I've read in the Camel Book that you could call
open with a command, let's say
netstat, with a pipe, like this :
open(NETWORK, "netstat -i -n |");
But it seems that when you call
open with a pipe (to get the output of
netstat, like in the previous sample code, for example), the opened FileHandle is write-only, or read-only, you can't write and read at the same time ... It isn't "interactive".
What I'm looking for is a way to execute
rlogin, and then execute a set of shell commands on the remote host, as well as getting their output ...
Is there some trick to do with the
open call, or is this method not the right one ?
Is there another way than using the
open call ?
Thanks for your answers
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.