Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Fellow monks, I'm painfully confused by an apparent broken interaction between IO::Pipe and Net::Server(::Fork). I have a program which started life as a standalone command-line tool. At its heart, it created a new IO::Pipe and used it as $pipe->reader('command', 'arg'); I needed to change the standalone tool to be a socketed server and picked Net::Server::Fork since that seemed like a good fit. Now, a server child process collects all sorts of stuff from the connected client and then proceeds to run a wrapped version of what started in the stadalone tool. However, in the standalone version, I could do:
$pipe->reader('command', 'arg'); my $line = scalar(<$pipe>);
and I'd get data. In the Net::Server/wrapped version, I don't get anything from the scalar(<$pipe>); call and, instead, the output of 'command' is dumped on the server's STDERR. Has anyone seen this behavior or have an idea of what could be broken?

In reply to (Seemingly) Broken interactions between Net::Server and IO::Pipe? by bmcatt

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-06-27 12:05 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (88 votes). Check out past polls.