home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / perl / 7051 < prev    next >
Encoding:
Text File  |  1992-11-18  |  866 b   |  27 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!stanford.edu!leland.Stanford.EDU!donghao
  3. From: donghao@leland.Stanford.EDU (dong hao zhang)
  4. Subject: How to output % symbol in perl
  5. Message-ID: <1992Nov19.004813.16052@leland.Stanford.EDU>
  6. Sender: news@leland.Stanford.EDU (Mr News)
  7. Organization: DSG, Stanford University, CA 94305, USA
  8. Distribution: usa
  9. Date: Thu, 19 Nov 92 00:48:13 GMT
  10. Lines: 15
  11.  
  12. Suppose we run a file like the following:
  13.  
  14. #! /usr/pubsw/bin/perl
  15. printf STDOUT "\% A Latex Picture. \n";
  16.  
  17. The output of the above file is:
  18. A Latex Picture. 
  19. instead of the desired: % A Latex Picture.
  20.  
  21. Any idea why the backslash does not protect the % symbol from 
  22. being interpreted ? And how may I output the % symbol with a perl script?
  23.  
  24. Thanks for any help.
  25.  
  26. Dong Hao Zhang                         donghao@leland.stanford.edu
  27.