Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Re: Re: pipes and return data

by l2kashe (Deacon)
on Oct 31, 2003 at 18:59 UTC ( #303663=note: print w/replies, xml ) Need Help??

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;

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://303663]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2022-08-10 06:11 GMT
Find Nodes?
    Voting Booth?

    No recent polls found