recursive perl?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Here's what I'd like to do (unwise as it is) in a perl script:

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...


Re: recursive perl?

On Wed, 04 Jun 2008 20:00:02 -0700, bukzor wrote:

Quoted text here. Click to load it

Your requirements are totaly unclear to me, but I guess you should start
with reading perldoc perlipc, especially the section "talking to


Site Timeline