home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!koonda.acci.com.au!ggr
- From: ggr@koonda.acci.com.au (Greg Rose)
- Subject: Re: Help with named pipes
- Message-ID: <9222709.15857@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Australian Computing and Communications Institute
- References: <1992Aug12.163401.5091@news.eng.convex.com> <1992Aug12.192105.5316@rock.concert.net> <mcook.713657379@fendahl.dev.cdx.mot.com> <1992Aug13.013018.8953@rock.concert.net>
- Date: Thu, 13 Aug 1992 23:10:56 GMT
- Lines: 27
-
- In article <1992Aug13.013018.8953@rock.concert.net> cole@concert.net (Derrick C. Cole) writes:
- >In article <mcook.713657379@fendahl.dev.cdx.mot.com> mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
- >>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
-
- I'd be prepared to bet that the writer is NOT writing out the null
- character at the end of the string. Probably says
- "write(fd, s, strlen(s));"
- nd I'll bet the strings even have newlines!
- --
- Greg Rose Australian Computing and Communications Institute
- ggr@acci.com.au +61 3 282 2532
-