Do you have a question? Post it now! No Registration Necessary. Now with pictures!
June 5, 2008, 3:00 am
rate this thread
1. pipe a perl script into a perl subprocess and capture the output
into a file (easy)
2. change the output of the perl subprocess to another file (also
easy: just pipe in an open(STDOUT, ">$file"))
3. Take the output of #1 and pipe that into the perl subprocess.
The problem is that perl waits for an end-of-file before starting
execution, so the output of #1 is not ready by the time I get to #3.
The main point of this is to preserve all the variables in perl's
memory on the second pass, so closing perl is not an option.
Is there a way to force perl to start executing before it gets to EOF?
I guesss I'm basically asking for an interactive mode...
- » RHS of s/LHS/RHS/ with $1, $2, etc. without "eval"?
- — Previous thread in » PERL Discussions