The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

A perl piping question

Hello,

I'm attempting to run an executable program from within perl.  Previously the system() command was sufficient for this task, but I want to capture the output as it is produced.  As I understand it I need a pipe, as I need the output as it is being produced, as opposed to when the process has completed.

Unfortunately my system (openVMS) doesn't have the fork() function implemented, which prevents me using IPC::Open2() which is as close as I got to solving the problem.

Does anyone have any idea what other options there are in perl?
Furious George
Tuesday, August 15, 2006
 
 
*myName
Tuesday, August 15, 2006
 
 
Is this a case where

open(AFILE, "randomprogram|");

won't work?
George Jansen Send private email
Tuesday, August 15, 2006
 
 
@output = qx(runme);
n
Tuesday, August 15, 2006
 
 
System does a fork and then an exec so I don't know how system would be working.

You could write the output to a file and have another procecess poll the file for new data and process it.
son of parnas
Tuesday, August 15, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz