home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / perl / 7068 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  1.0 KB

  1. From: wnw@hpfcso.FC.HP.COM (Bill Weiner)
  2. Date: Thu, 19 Nov 1992 19:35:30 GMT
  3. Subject: Re: How to output % symbol in perl
  4. Message-ID: <9830013@hpfcso.FC.HP.COM>
  5. Organization: Hewlett-Packard, Fort Collins, CO, USA
  6. Path: sparky!uunet!wupost!sdd.hp.com!hpscit.sc.hp.com!scd.hp.com!hpscdm!hplextra!hpfcso!wnw
  7. Newsgroups: comp.lang.perl
  8. References: <1992Nov19.004813.16052@leland.Stanford.EDU>
  9. Lines: 25
  10.  
  11. In comp.lang.perl, donghao@leland.Stanford.EDU (dong hao zhang) writes:
  12.  
  13. > Suppose we run a file like the following:
  14. > #! /usr/pubsw/bin/perl
  15. > printf STDOUT "\% A Latex Picture. \n";
  16. > The output of the above file is:
  17. > A Latex Picture. 
  18. > instead of the desired: % A Latex Picture.
  19. > Any idea why the backslash does not protect the % symbol from 
  20. > being interpreted ? And how may I output the % symbol with a perl script?
  21. >  
  22. > Thanks for any help.
  23. > Dong Hao Zhang                         donghao@leland.stanford.edu
  24.  
  25.  printf STDOUT "%% A Latex Picture. \n";
  26.  
  27. works for me.
  28.  
  29. Bill Weiner
  30. wnw@hpeswnw.fc.hp.com
  31.  
  32.