home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2863 < prev    next >
Encoding:
Internet Message Format  |  1991-02-28  |  2.3 KB

  1. From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall)
  2. Newsgroups: comp.lang.perl,alt.sources
  3. Subject: Re: An AWK script to check "junk" for newsgroups
  4. Message-ID: <11594@jpl-devvax.JPL.NASA.GOV>
  5. Date: 26 Feb 91 19:15:22 GMT
  6.  
  7. In article <NE-4OD@ppcger.ppc.sub.org> Sepp@ppcger.ppc.sub.org (Josef Wolf) writes:
  8. : lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes:
  9. : ] In article <u4+nMD@ppcger.ppc.sub.org> Sepp@ppcger.ppc.sub.org
  10. : ] (Josef Wolf) writes:
  11. : ] : Well. Fine fine. But what about using standard-tools? Which *IX is
  12. : ] : _delivered_ with Perl?
  13. : ] Convex's OS.  BSD 4.4 will have it.  It's included with GNU.  Eventually
  14. : ] everyone will include it, I suspect.
  15. : C'mon! Get your feet back on earth. I'm sure there are _some_ people out
  16. : in net.lands who don't want to buy a new OS just to get the fun of Perl.
  17.  
  18. Who ever said they had to buy a new OS to get the fun of Perl?  I fear one
  19. of your inclusive ORs turned into an exclusive OR while you weren't looking.
  20.  
  21. : ] : Now here is my version of NEWJUNK. It could have been better, but older
  22. : ] : versions of gawk have these ugly memory-leak, so you have to sort out
  23. : ] : the 'Newsgroups:' lines and pipe it into gawk :-(
  24. : ] Well. Fine fine. But what about using standard-tools? Which *IX is
  25. : ] _delivered_ with gawk?  :-)
  26. : Why don't you use awk ? ;-)
  27.  
  28. I do.  When appropriate.
  29.  
  30. : ] : The awk-version will most likely be slower than the C-version and the
  31. : ] : Perl-Version, but it schould run on most *IX with little modifications.
  32. :                                                       ^^^^^^
  33. : ] Right.
  34. : ] On my Vax:
  35. : ] $ awk -f newjunk.awk
  36. : [ some error messages deleted ]
  37. : Well, I said 'with _little_ modifications'. Not 'without modifications'...
  38.  
  39. You used a bunch of features that weren't even available in "standard" awk,
  40. such as user-defined functions, match() and getline with redirections.
  41. I don't think that counts as "little modification".
  42.  
  43. : ] On my Sun:
  44. : ] $ nawk -f newjunk.awk
  45. : ] nawk: empty regular expression
  46. : ]  source line number 51
  47. : ]  context is
  48. : ]          >>> // <<<  {
  49. : Waht about this one:
  50. : /.*/    {
  51. : ] Your "standard" tools ain't so standard.   :-(
  52. : But much more standard than Perl.
  53.  
  54. In a year, this will be a topic for historians.  nawk has priced itself
  55. out of the market, and gawk is already diverging from nawk.
  56.  
  57. Larry
  58.