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

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
coreolyn, i've been following this node very closely. you can see by my replies that i have been trying to solve a similar issue. i was never satisfied with my implementation... mostly due to tilly's constant, nagging reminders to use select :)

well, i did a little investigation on select, and i found some interesting things you'll appreciate. for instance, select is only implemented on sockets in Win32. hrmm. also, open2/open3 cannot redirect input/output in a child process via fork in Win32. i'm afraid a lot of the code you have there is not doing anything useful.

here's a list of links for more information:

IO::Select on Windows
stdin-socket without fork()??

here's a test script to verify select is in fact, not working. can_write, can_read, and has_exception all come back undef on Win32... (see below)

#!/usr/bin/perl use IO::Select; # create typeglobs and add to selector $output_select = IO::Select->new( *CMD_ERR, *CMD_OUT, *CMD_IN ); # test selector methods $cnt = $output_select->count(); print "count: $cnt\n"; @bob = $output_select->handles(); print "list: @bob\n"; @bob = $output_select->can_write(10); print "write: @bob\n"; @bob = $output_select->can_read(10); print "read: @bob\n"; @bob = $output_select->has_exception(10); print "exception: @bob\n"; close(CMD_IN); close(CMD_OUT); close(CMD_ERR);
i'm now working on a client / server solution for executing external programs and redirecting output using sockets. as soon as i have something solid, i'll be sure to post it, and /msg you with the node_id.

thank you for using microsoft ;-D


In reply to Re: Open3 and bad gut feeling by particle
in thread Open3 and bad gut feeling by coreolyn

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

  • 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, 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, 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [erix]: I'm waiting for that zipfile-reading to show up in DBD::SQLite :)
    [Corion]: hippo, erix: That sounds promising :)
    [Corion]: erix: I misinterpreted that. It only allows to read a zipfile like a table, not reading a database from a zipfile :-(
    shmem is grabbed by nostalgia for Bolivia
    [erix]: aah, ok.
    [erix]: oh well, in each life some rain must fall
    [erix]: if you're interested in tsv file reading in pg, look at file_fdw

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (12)
    As of 2018-02-23 15:21 GMT
    Find Nodes?
      Voting Booth?
      When it is dark outside I am happiest to see ...

      Results (302 votes). Check out past polls.