in reply to redirect output from a command to another command
I don't know if I answer you question, but I post anyway!
There is the pipe-way:
open PIPE_ONE, 'echo -e "oranges"|' or die "Can't fork"; open PIPE_TWO, 'echo -e "apples"|' or die "Can't fork (again?)"; my $line_pipe_one = readline(*PIPE_ONE);
Then these behaves as normal files. Ofcourse if you put the pipe at the beginning is a command you write to:
open PIPE_THREE, '| wc -l'; print PIPE_THREE "Hello World\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: redirect output from a command to another command
by ikegami (Patriarch) on Mar 01, 2011 at 22:08 UTC |