reader (ARGS) The object is re-blessed into a sub-class of IO::Handle , and becomes a handle at the reading end of the pipe. If ARGS are given then fork is called and ARGS are passed to exec.So what is happening is you are forking off a process such that the command is "echo" and the arguments to the command are "foo", ">" and "bar." So the behavior your are describing makes perfect sense to me. Maybe you want to
unless (fork()){ system ("echo foo > bar"); }
Not sure why you'd open a pipe on a command that doesn't return anything to stdout to be read by a pipe... just my thought....
In reply to Re: pipe help!
by blue_cowdawg
in thread pipe help!
by docdurdee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |