docdurdee has asked for the wisdom of the Perl Monks concerning the following question:
Dearest Monks, my question is probably sillier than I try to be with my perl. when I use IO::Pipe to run processes that aren't actually pipes (as I understand them), I get weird behavior.
use Modern::Perl; use IO::Pipe; my $pipe = IO::Pipe->new; $pipe->reader(qw(echo foo > bar)); while (<$pipe>){ print; }
the above code prints "foo > bar", which I don't understand. I was expecting the $pipe to just close and for nothing to be printed after the process is completed. Can someone help me clean up my thinking on this?
D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pipe help!
by blue_cowdawg (Monsignor) on Aug 25, 2011 at 15:06 UTC | |
by docdurdee (Scribe) on Aug 25, 2011 at 15:24 UTC | |
|
Re: pipe help!
by Anonymous Monk on Aug 25, 2011 at 15:02 UTC | |
|
Re: pipe help!
by locked_user sundialsvc4 (Abbot) on Aug 26, 2011 at 14:10 UTC |