home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5661 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.2 KB

  1. Path: sparky!uunet!sun-barr!rutgers!carssdf!watson
  2. From: watson@carssdf.UUCP (- Self Empl. Sys.Integrator)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: how to 'write' cr-nl
  5. Message-ID: <400@carssdf.UUCP>
  6. Date: 1 Sep 92 17:41:20 GMT
  7. References: <399@carssdf.UUCP> <ASHERMAN.92Sep1091415@laser.fmrco.com>
  8. Reply-To: watson@carssdf.UUCP (John Watson -- Self Empl. Sys.Integrator)
  9. Organization: John Watson (Self Employed System Integrator)
  10. Lines: 24
  11.  
  12. In article <ASHERMAN.92Sep1091415@laser.fmrco.com> asherman@fmrco.COM writes:
  13. >
  14. >>>>>> watson@carssdf.UUCP (- Self Empl. Sys.Integrator) said:
  15. >
  16. >watson> Is there an easy way to write CR-NL at the end of the lines
  17. >watson> instead of just "\n".  Sort of like  $\ = "\r\n", except make
  18. >watson> it apply to the write statement?
  19. >
  20. >What's wrong with:
  21. >
  22. >format STDOUT =
  23. >@<<<<<<<<<<<<<<<<<< Test: @>>>>>>>>>>>> ^M
  24. >.
  25.  
  26. My problem here, besides forgeting to put it in on a line or two, and
  27. creating a debugging mess is possibily
  28.  
  29. entering spaces after the ^M which are not visible by the vi editor,
  30. creating leading white space on the next line.
  31.  
  32. With all the printers that don't cr on nl, I just thought there must be
  33. some easy way to do this correctly.
  34.  
  35. John Watson
  36.