home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / perl / 5304 < prev    next >
Encoding:
Text File  |  1992-08-13  |  1.5 KB  |  39 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!koonda.acci.com.au!ggr
  3. From: ggr@koonda.acci.com.au (Greg Rose)
  4. Subject: Re: Help with named pipes
  5. Message-ID: <9222709.15857@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Australian Computing and Communications Institute
  8. 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>
  9. Date: Thu, 13 Aug 1992 23:10:56 GMT
  10. Lines: 27
  11.  
  12. In article <1992Aug13.013018.8953@rock.concert.net> cole@concert.net (Derrick C. Cole) writes:
  13. >In article <mcook.713657379@fendahl.dev.cdx.mot.com> mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
  14. >>How about this:
  15. >>
  16. >>  $/ = "\000";        # the input record separator
  17. >>  while (<FIFO>)
  18. >>  {
  19. >>    chop;        # discard the \0
  20. >>    print "|$_|\n";
  21. >>  }
  22. >
  23. >Greetings, Michael!
  24. >
  25. >That _almost_ works (a lot cleaner, too!)  All I did to change the above was
  26. >remove the record separator assignment to take the default and voila!  It
  27. >works (with the assignment, $_ grows and grows, printing only when the writer
  28. >closes!)  Thanks so much for helping me with this trivial problem.
  29. >
  30. >Derrick
  31.  
  32. I'd be prepared to bet that the writer is NOT writing out the null
  33. character at the end of the string. Probably says
  34.   "write(fd, s, strlen(s));"
  35. nd I'll bet the strings even have newlines!
  36. --
  37. Greg Rose                 Australian Computing and Communications Institute
  38. ggr@acci.com.au                                              +61 3 282 2532
  39.