open(CHILD, "| ./myscript 2>&1") or die "Can't open: $!"; print CHILD "mycommand\n";