home *** CD-ROM | disk | FTP | other *** search
- From: wnw@hpfcso.FC.HP.COM (Bill Weiner)
- Date: Thu, 19 Nov 1992 19:35:30 GMT
- Subject: Re: How to output % symbol in perl
- Message-ID: <9830013@hpfcso.FC.HP.COM>
- Organization: Hewlett-Packard, Fort Collins, CO, USA
- Path: sparky!uunet!wupost!sdd.hp.com!hpscit.sc.hp.com!scd.hp.com!hpscdm!hplextra!hpfcso!wnw
- Newsgroups: comp.lang.perl
- References: <1992Nov19.004813.16052@leland.Stanford.EDU>
- Lines: 25
-
- In comp.lang.perl, donghao@leland.Stanford.EDU (dong hao zhang) writes:
-
- > Suppose we run a file like the following:
- >
- > #! /usr/pubsw/bin/perl
- > printf STDOUT "\% A Latex Picture. \n";
- >
- > The output of the above file is:
- > A Latex Picture.
- > instead of the desired: % A Latex Picture.
- >
- > Any idea why the backslash does not protect the % symbol from
- > being interpreted ? And how may I output the % symbol with a perl script?
- >
- > Thanks for any help.
- >
- > Dong Hao Zhang donghao@leland.stanford.edu
-
- printf STDOUT "%% A Latex Picture. \n";
-
- works for me.
-
- Bill Weiner
- wnw@hpeswnw.fc.hp.com
-
-