Pipe Between Programs
- From: "E.D.G." <edgrsprj@xxxxxxxxxxxxx>
- Date: Wed, 8 Apr 2009 22:48:14 -0500
CREATING A PIPE BETWEEN TWO PERL PROGRAMS
Windows and ActiveState Perl are being used
Can anyone supply the code for creating two direction pipes between two Perl programs that are running at the same time?
A separate goal is to learn how to establish two direction pipes between a Perl program and some other language program. It is assumed that the same type of procedure would be used.
The following code is presently being used to create a one direction pipe between a Perl program and the Gnuplot graphics program. I have not yet been able to learn how to easily modify it so that a connection can be established between two Perl programs.
open gnuplot, 'pgnuplot.exe';
print gnuplot 'some command', "\n";
Using that code, the Gnuplot graphics programs pgnuplot.exe and wgnuplot.exe both need to be in the same directory as the Perl program.
After the pipe is created, how does one Perl program input information from the other? I am guessing that it is some variation of the readline command such as:
$temp = readline program2;
One of the goals here is to develop procedures that will enable researchers around the world to work on the same scientific projects while using whatever computer languages they prefer.
- Prev by Date: how to check missing breaks in switch case blocks
- Next by Date: FAQ 5.6 How do I make a temporary file name?
- Previous by thread: how to check missing breaks in switch case blocks
- Next by thread: Re: Pipe Between Programs