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

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!darwin.sura.net!jvnc.net!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!news2me.EBay.Sun.COM!exodus.Eng.Sun.COM!sundance.Eng.Sun.COM!stanton
  2. From: stanton@sundance.Eng.Sun.COM (W. Dean Stanton)
  3. Newsgroups: comp.lang.perl
  4. Subject: Buglet in Programming perl book regading ctime perl library
  5. Date: 18 Nov 1992 18:13:13 GMT
  6. Organization: Sun Microsystems Inc., Mountain View, CA
  7. Lines: 16
  8. Message-ID: <lgl1tpINNpgh@exodus.Eng.Sun.COM>
  9. NNTP-Posting-Host: sundance
  10. Keywords: ctime.pl bug error newline \n ctime timestamp string
  11.  
  12. In the book _Programming perl_, March 1992 edition, on page 402,
  13. in the discussion of "ctime.pl" (the ctime routine for converting
  14. a timestamp into a string) the example
  15.     print &ctime(time),"\n";
  16. is incorrect because ctime.pl (and the Unix ctime routine)
  17. include the newline on the end of the string returned.
  18. It should be simply:
  19.     print &ctime(time);
  20.  
  21. P.S., I'm not a reader of comp.lang.perl, so don't bother flaming me
  22. if everyone already knew this.
  23. --
  24.     - W. Dean Stanton, (415) 336-7417 or 960-1300
  25.       Graphics Software, Mail Stop MTV21-04
  26.       Sun Microsystems, 2550 Garcia, Mountain View, CA 94043
  27.       dstanton@Sun.COM    (Mountain View Building 21, Room 2280A)
  28.