in reply to Reading input from concurrent processes

I'm not sure why you couldn't do something like

$i=0;
while ($i < NUMBEROF HOSTS) {
$pid = fork();
if ($pid == 0) {
my $instance=$i;
last;
(etc.)

and have some array w/ the hostnames and each child would use array$i for the hostname then do the pipe.
Another possibility is to use anonymous typeglobs and generate a typeglob for each hostname and use it to open the process to pipe, etc. and test each filehandle to see if it is ready to be read (i.e. non-blocking I/O)...uggh.
Sounds like there should be a CPAN module for this.
The only real advantage to punk music is that nobody can whistle it.
  • Comment on Re: Reading input from concurrent processes