in reply to pipe help!
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....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: pipe help!
by docdurdee (Scribe) on Aug 25, 2011 at 15:24 UTC |