
open command that pipes both in and out
I need to filter some data through another program, so I need to
open the command write to it and read the result back. The camel
book says that "You may not have an open coomand that pipes both in
and out, though it is easy to build one using the _pipe_ and _fork_
commands." Well, could somebody tell me how to build this.... I
have tried anything and everything I can think of, but nothing.
As an example of the type of problem, using (say) "sort":
open(SORT, "| sort |");
close(SORT);
Obviously this doesn't work, but that is the type of thing I need. Any help
would be *greatly* appreciated. This is the only stumbling block left in
some code I need to get up.
Tim Irvin
p.s.: If you would answer in e-mail, I'd appreciate it. If I get a number
of replies I'll summarize.