in reply to Open, ye! And read from your child!
$|++; if (my $pid = open(READ, "-|")) { my $line = <READ>; print "child said: [", $line, "]; ",time,"\n"; $line = <READ>; print "child said: [", $line, "]; ",time,"\n"; } else { print "hello; ",time,"\n"; sleep 2; print "how are you; ",time,"\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Open, ye! And read from your child!
by gryng (Hermit) on Nov 13, 2001 at 01:42 UTC |