http://qs321.pair.com?node_id=303663


in reply to Re: Re: pipes and return data
in thread pipes and return data

Anytime you see "see <Module::Name::Here>" you can do perldoc Module::Name::Here to see the documentation, provided the module is installed on your host.

In terms of finishing with the application, if you end up going with the IPC::Open[23] methodology you would do something ala

# assuming READ, and WRITE are the reader and writer FHs # and $pid is the pid of the process spawned close(READ); close(WRITE); waitpid $pid, 0; # or if you used FileHandle objects or autovivified scalars close($read); close($write); waitpid $pid, 0;

After rereading your post, I noticed I didn't answer the right question. How does the program presently know you are done writing? Is there some sentinel value? Do you pass a <CTRL> + d? You will simply do the same at the end of your write loop. Alternately if you don't have that functionality presently in the prog, you could add it and then make use of it :).

use perl;