use IO::Handle qw( ); # For autoflush ... my $pid = open2($JSREAD, $JSWRITE, ...); $JSWRITE->autoflush(1); ...