in reply to Re: "- |" pipe option doesn't work
in thread "- |" pipe option doesn't work

Hm. Is that doc quote 5.8.4 specific? Because it works okay in 5.8.9.

This code:

#! perl -slw use strict; open PIPE, '-|', q[ c:\\perl32\\bin\\perl.exe -v ] or die $^E; print "<<<$_>>>" while <PIPE>;

Produces this output:

C:\test>\perl32\bin\perl junk99.pl <<< >>> <<<This is perl, v5.8.9 built for MSWin32-x86-multi-thread >>> <<<(with 12 registered patches, see perl -V for more detail) >>> <<< >>> <<<Copyright 1987-2008, Larry Wall >>> <<< >>> <<<Binary build 826 [290470] provided by ActiveState http://www.Active +State.com >>> <<<Built May 24 2009 09:21:05 >>> <<< >>> <<<Perl may be copied only under the terms of either the Artistic Lice +nse or the >>> <<<GNU General Public License, which may be found in the Perl 5 source + kit. >>> <<< >>> <<<Complete documentation for Perl, including FAQ lists, should be fou +nd on >>> <<<this system using "man perl" or "perldoc perl". If you have access + to the >>> <<<Internet, point your browser at http://www.perl.org/, the Perl Home + Page. >>> <<< >>>

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^3: "- |" pipe option doesn't work
by Corion (Patriarch) on Jan 09, 2017 at 17:10 UTC

    I think the quote specifically refers to the naked pipe-self-open:

    open my $fh, '-|' or die;

    which basically launches a forked copy of the current process. I don't think this has ever been implemented for Windows Perl.

      I think the quote specifically refers to the naked pipe-self-open:

      Ah. Okay, I never even knew *that* was a possibility. (Should have read the OP as well as your reply :)


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
      In the absence of evidence, opinion is indistinguishable from prejudice.
Re^3: "- |" pipe option doesn't work
by choroba (Cardinal) on Jan 09, 2017 at 16:37 UTC
    I don't have a Win32 machine available now, but perlport in blead contains a slightly reformulated version of the same:
    open (Win32, RISC OS) Open modes "|-" and "-|" are unsupported.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,