home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!mcsun!sunic!psinntp!psinntp!walney!jimrutt
- From: jimrutt@walney.com (Jim Rutt)
- Subject: Piping to and from a unix command
- Message-ID: <1992Sep5.000616.5940@walney.com>
- Keywords: unix pipe perl
- Organization: JPR Ventures
- Date: Sat, 5 Sep 92 00:06:16 GMT
- Lines: 24
-
-
-
- There's an intriguing aside in the O'Reilly & Assoc PERL book page 163
- in the description of the Open function speaking of using the open
- function to open a pipe to a unix command:
-
- "you may not have an open pipe command that pipes both in
- and out, though it's easy to build using the _pipe_
- and _fork_ commands."
-
- Unfortunately as a not very expereinced UNIXer and "C"er, fork and pipe
- just aren't very intuitive for me yet.
-
- What I'm trying to do is open a pipe both to and from the same invocation
- of a unix command - say for example grep, that lets me write to the command
- and get back the result from it in the same perl program if writing and
- reading from a file.
-
- I presume that's what is alluded to in the quote above. If so, how
- do I do it???
-
-
-
-
-