[87] in Back_Bay_LISA

home help back first fref pref prev next nref lref last post

Re: Perl before swine

daemon@ATHENA.MIT.EDU (Marc Horowitz)
Sat Nov 21 05:39:35 1992

To: Tom Fitzgerald <fitz@wang.com>
Cc: bblisa@inset.com
In-Reply-To: [86] in Back_Bay_LISA
Reply-To: Marc Horowitz <marc@MIT.EDU>
Date: Sat, 21 Nov 92 03:39:08 EST
From: Marc Horowitz <marc@MIT.EDU>

>> Nearly all the system calls, and most of the useful library routines, are
>> native to perl.  Things like popen are implicit in the syntax of other
>> operations.

Heh.  Perl gives you syscall().  You can do anything.  I've done AFS
pioctl's in perl.  (It was a proof of concept.  I don't actually use
it for anything.)

My point of view: I've been using perl for about three years, and I
maintain it for MIT.  (And for work, but that's a much smaller site.)
I've been accused of proselytizing for perl in the past, and I'll be
accused of it in the future.  People are usually right.

Why do I use perl?  My main reason is that I am constantly jumping
between bsd on vaxen, aos on rt's, ultrix on vax and mips, aix, sunos,
nextstep, hp/ux, and more if I stop to think about it harder.  Keeping
a program I use often up to date on all those machines is difficult,
time-consuming, and horribly wasteful of disk space.  I keep perl
up-to-date (which is very easy - it builds on practically anything),
and all my perl scripts just work.  I change one script, and
instantly, I have a current version on eight different platforms.
This is invaluable.

I also like perl's expressiveness, and speed of coding.  The
inconsistencies are bothersome, but I've done so much perl coding that
they're second-nature by now, and don't bother me.

Some scripts I use often are:

expn.pl	-	give it user@domain.name, and it looks up the domain
		name.  It prints MX records, and if there aren't any,
		or if the preferred MX address matches the host, the
		script connects to the SMTP port and EXPN's the list.
		You can also force it to ignore the MX records.

resolv_axfr.pl -Give it a domain name, it finds the right server, and
		does a domain transfer.  Handy for piping through
		grep, or scanning to look for a hostname you don't
		remember, but will recognize

rename.pl -	given earlier

fingerd.pl -	Runs on a local machine to provide some
		athena-specific functionality.  Very popular.


I also have a bunch of scripts which could have been done in awk, but
were just easier in perl.


I've never been able to make a bblisa meeting, but I'd be willing to
talk for a little bit about perl, or answer questions about it.
Perhaps we can do a local version of what was done a usenix or two
ago, where people brought old shell/awk/grep/sed scripts (give me your
tired, your hungry...), and Larry and Tom rewrote them on the spot
into perl.

		Marc Horowitz
		Aktis, Inc.
--
Send mail for the `bblisa' mailing list to `bblisa@inset.com'.
Mail administrative requests to `bblisa-request@inset.com'.

home help back first fref pref prev next nref lref last post