my $pid1 = open my $fh1, "pgm1|"; my $pid2 = open my $fh2, "pgm2|"; my $read_set = new IO::Select(); $read_set->add($fh1); $read_set->add($fh2); ...