in reply to My fifo wtf.

Also, open \$var doesn't create a system file handle, just a Perl handle. It can't become the child's STDOUT.

Replies are listed 'Best First'.
Re^2: My fifo wtf.
by EvanCarroll (Chaplain) on Dec 18, 2008 at 18:45 UTC
    So how do you capture STDOUT from the child into perl?


    Evan Carroll
    I hack for the ladies.
    www.EvanCarroll.com
      open(my $from_child, '-|', "cat < foobar") or die $!; <$from_child>
      open2(my $from_child, $fifo, "cat") or die $!; <$from_child>