Eradicatore has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl -w use IPC::Open2; #$| = 1; open2(\*IN, \*OUT, "f2.pl"); print OUT "proclist\n"; print OUT "quit\n"; while ($line = <IN>) { print "parent:$line"; } close IN; print "parent done\n"; close OUT; exit;
On windows it returns this:#!/usr/local/bin/perl -w use IPC::Open2; #$| = 1; while ($line = <STDIN>) { #last if ($line =~ /quit/i); print "child_got_this:$line"; } print "child done\n"; exit;
Justin Eltoft
"If at all god's gaze upon us falls, its with a mischievous grin, look at him" -- Dave Matthews
|
---|
Replies are listed 'Best First'. | |
---|---|
(tye)Re: My latest IPC::Open2 attempt
by tye (Sage) on Sep 26, 2001 at 02:23 UTC | |
by Eradicatore (Monk) on Sep 26, 2001 at 02:29 UTC |