select((select(STDOUT), $|=1)[0]);

And the whole script that made it all work:

$pid = open3(*CMD_IN, *CMD_OUT, *CMD_ERR, $path, @arguments);
close(CMD_IN);

$selector = IO::Select->new();
$selector->add(*CMD_ERR, *CMD_OUT);

while(@ready = $selector->can_read) {
foreach my $fh (@ready) {
if(fileno($fh) == fileno(CMD_ERR)) {
my $line = scalar ;
if(defined $line) {
parseErrorStream($line);
}
}
else {
my $line2 = scalar ;
if(defined $line2 and $print eq 1) {
parseStandardStream($line2);
}
}
$selector->remove($fh) if eof($fh);
}
}
close(CMD_OUT);
close(CMD_ERR);