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