open PROG,"|/some/program" or die "Can't fork program: $!"; print PROG "input line 1\n"; print PROG "input line 2\n"; close PROG;