in reply to Re^2: "Answer" questions in an interactive program?
in thread "Answer" questions in an interactive program?
Does this behave differently on Windows?
Seems so:
c:\test>perl #!/usr/bin/perl -l my $cmd = q(perl -e "chomp(my $ret = <STDIN>); exit $ret+1"); my $pid = open CMD, '|-', $cmd or die $!; print CMD 98; close CMD; print "status from close: ", $? >> 8; waitpid $pid, 0; print "status from waitpid: ", $? >> 8; ^Z status from close: 99 status from waitpid: 99
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: "Answer" questions in an interactive program?
by Anonymous Monk on May 11, 2010 at 12:26 UTC |