On 05/09/2014 04:58 PM, Shawn H Corey wrote:
On Fri, 09 May 2014 16:41:02 -0400 Harry Putnam <[email protected]> wrote:As soon as I think I've got it right by thinking: ok, left side is into the command right side is out. If I start pondering over that ... it begins to seem it is the other way. Gack.... I'm sick of it.Agreed. I wished they used something like: ">|" and "<|"
they use - as that is also the magic name for stdio. in many unix tools you can pass - as the filename (in or out) and the program will use the appropriate i/o direction of stdio instead.
so it is an easy way to remember. |- has the pipe going out to the - so that means stdout will be connected to the handle. -| has the - going in to the pipe so that means stdin will be connected to the handle. and i mean stdin/out of the process being forked. and you can't do both ways as that would likely cause hanging with blocking i/o.
and if you want finer control, then use IPC::Open[23] uri -- Uri Guttman - The Perl Hunter The Best Perl Jobs, The Best Perl Hackers http://PerlHunter.com -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
