home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / perl / 5930 < prev    next >
Encoding:
Text File  |  1992-09-14  |  970 b   |  30 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!news
  3. From: andy@orchid.bdc.ubc.ca (Andrew Dwelly)
  4. Subject: STDOUT & STDERR
  5. Message-ID: <1992Sep14.224832.21737@unixg.ubc.ca>
  6. Sender: news@unixg.ubc.ca (Usenet News Maintenance)
  7. Nntp-Posting-Host: orchid.bdc.ubc.ca
  8. Organization: University of British Columbia, Vancouver, B.C., Canada
  9. Date: Mon, 14 Sep 1992 22:48:32 GMT
  10. Lines: 18
  11.  
  12.  
  13. Another beginners question. Whats the idiom in perl for starting
  14. a sub process with a filehandle, and getting both the STDOUT and
  15. the STDERR of that process for subsequent parsing ??
  16.  
  17. I suppose what I have in mind is something like :-
  18.  
  19. open (CHILD, "child_process 2>&1 |"); # I don't think this works!
  20. while (<CHILD>)
  21. {
  22.    do_something_with_child_here;
  23. }
  24.  
  25. that is, to be able to read the child's STDOUT, and STDERR in order
  26. to see when something horrid has happened to child_process.
  27.  
  28. Andy (andy@bcu.ubc.ca)
  29.   
  30.