Update:

I found version 20000216 of Win32::Pipe on roth.net, installed that, and now I'm able to do a vanilla perl file open, but it passes me the same sort of garbage the Win32API::File version was.

I am trying to interpret this as good news for me, but I haven't succeeded yet...

# Vanilla file implementation open( PIPE, "+<" . $PIPE_NAME ) || die "couldn't open pipe"; print PIPE "vanilla!\0"; my $result = <PIPE>; print "Server said [$result]\n"; foreach (split //, $result) { print "[" . (ord $_) . "]"; } print "\n"; close PIPE;
Output of the two look like:
Server read: [vanilla! { require $path; }; ] [118][97][110][105][108][108][97][33][0][123] [32][114][101][113][117][105][114][101][32][36] [112][97][116][104][59][32][125][59][13][13][10] and... Server said [{ require $path; }; ] [123][32][114][101][113][117][105][114][101] [32][36][112][97][116][104][59][32][125][59][13][10]
(line breaks within the ord dumps inserted for clarity)

Perhaps I'd just fumbled the open call, earlier, when I couldn't get the vanilla file version working.

Clearly, though, I'm getting too many characters. The \0 at the end of my client send was pure desperation--sending a \n doesn't stop it correctly either.


In reply to Re: Re3: Tye, that does the job. by Coleoid
in thread How do I open a r/w named pipe as a file? *Should* be simple... by Coleoid

Title:
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, 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:
    & &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.