home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / perl / 5310 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.9 KB

  1. Path: sparky!uunet!usc!news!netlabs!lwall
  2. From: lwall@netlabs.com (Larry Wall)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: minor bug report (or interesting behavior)
  5. Message-ID: <1992Aug14.011413.18043@netlabs.com>
  6. Date: 14 Aug 92 01:14:13 GMT
  7. References: <1992Aug6.154354.29565@spool.cs.wisc.edu>
  8. Sender: news@netlabs.com
  9. Distribution: na
  10. Organization: NetLabs, Inc.
  11. Lines: 33
  12. Nntp-Posting-Host: scalpel.netlabs.com
  13.  
  14. In article <1992Aug6.154354.29565@spool.cs.wisc.edu> cargille@calypso.cs.wisc.edu (Allan Cargille) writes:
  15. : Hi, I just started using perl and didn't know where to send bug
  16. : reports.  These may not even be bugs (depending on your definition, of
  17. : course!)
  18. : 1.  I tried to use a format field of "@<<<<<<<<<<<<<<<>>>>>>>>>>>>>"
  19. :     just for fun, to see if perl would justify both ends.  I invoked
  20. :     perl and I assume it started to compile the code.  The machine
  21. :     hung and the disk paged like crazy until I got an "out of memory"
  22. :     error!  During this time I couldn't kill it with control-C or halt
  23. :     it with control-Z.  Interesting.  I know the answer is "don't do
  24. :     that!" but thought someone want to know.
  25. : 2.  Also trying for the same result, I tried a format statement of
  26. :     @<<<<<<<<<<<<<<<<<<@>>>>>>>>>>>>>>>>>>>>
  27. :     $_, $_
  28. :     and it appeared to use the same information in $_ twice.  If
  29. :     arguments are passed "by value" then this would be correct; if "by
  30. :     reference" then it wouldn't be.  Which is it?  Is there a way to
  31. :     force this to do what I wanted it to?
  32.  
  33. The short answer is: If you want nroff, use nroff.
  34.  
  35. The long answer is: Perl can only left or right justify fields as a
  36. whole.  To do both ends at once implies some kind of fancy algorithm to
  37. insert spaces in the middle.  Perl has no such algorithm, and I have no
  38. intention of trying to supply one.  Durn ugly anyway.  Mutter, grumble...
  39.  
  40. Of course, if you're excruciatingly persuasive, I reserve the right to
  41. change my mind.  :-)
  42.  
  43. Larry
  44.