NON-SOURCE POSTINGS CONSIDERED HARMFUL!

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Sat Jan 26 03:52:25 AEST 1991


In article <1991Jan25.090627.14302 at convex.com> tchrist at convex.COM (Tom Christiansen) writes:
> :Now what is easier to maintain: a simple 7-line shell script, or a
> :28-line perl script?
> You're comparing apples with windmills.  Your script doesn't at
> all do the same thing.

Yes, it does, except for the difference I noted (and a few arbitrary
limitations that will never come up in practice).

For example, on this machine, /bin/cat and /usr/bin/cat are the same
file. Your perl script takes several lines of tests to make sure that it
doesn't report cat. My script takes one line to do the same thing.

On this machine, /bin/mail and /usr/ucb/mail are quite different. So
your script reports them. Mine does too. The difference is that mine
just says ``mail'' while yours also points out where the conflicting
versions are. Naturally, I think that it's the job of ``which'' to do
the latter, but it's just a 2-line change to the shell script if you
care.

Why are you dodging the question, Tom? Does it hurt your ego to see that
something is much more easily done with standard tools than with perl?

---Dan



More information about the Alt.sources.d mailing list