or download this
# add error processing as above
$pid = open(KID_TO_READ, "-|"); if ($pid) { # parent
...
It works on Linux but on Windows I get the following error:
'-' is not recognized as an internal or external command, operable pro
+gram
or batch file.