home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!stanford.edu!rock!cole
- From: cole@concert.net (Derrick C. Cole)
- Subject: Re: Help with named pipes
- Message-ID: <1992Aug13.013018.8953@rock.concert.net>
- Sender: news@rock.concert.net
- Organization: MCNC Data Operations
- References: <1992Aug12.163401.5091@news.eng.convex.com> <1992Aug12.192105.5316@rock.concert.net> <mcook.713657379@fendahl.dev.cdx.mot.com>
- Date: Thu, 13 Aug 1992 01:30:18 GMT
- Lines: 30
-
- In article <mcook.713657379@fendahl.dev.cdx.mot.com> mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
- >
- >>Now, 120 is an arbitrary number out of the air. What I'd really like is for
- >>read() to place in $buf a null-terminated string as written by the other end,
- >>and not just 120 characters. Am I completely blind, is there a way to do
- >>this, neither, or both?
- >
- >How about this:
- >
- > $/ = "\000"; # the input record separator
- > while (<FIFO>)
- > {
- > chop; # discard the \0
- > print "|$_|\n";
- > }
-
- Greetings, Michael!
-
- That _almost_ works (a lot cleaner, too!) All I did to change the above was
- remove the record separator assignment to take the default and voila! It
- works (with the assignment, $_ grows and grows, printing only when the writer
- closes!) Thanks so much for helping me with this trivial problem.
-
- Derrick
-
- --
- "GCC 2.0 is to C as SVR4 is to Unix."
- -- Dick Dunn
- ======
- Derrick Cole MCNC Center for Communications
-