Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perl scripts sought

2 views
Skip to first unread message

Bernie Cosell

unread,
Mar 3, 1989, 10:03:07 AM3/3/89
to
I'm expending some effort to try to come up to speed as a Perl hacker.
I'm a pretty good awk/sed/etc wizard, and Perl has caught my curiosity ever
since it appeared, but just recently I've been hit with some real motivation
to achieve some proficiency. BUT... I tend to learn this kind of stuff best
by actually SEEING some clever/complicated/tricky/useful applications, SO: if
you have any Perl scripts kicking around that you're willing to share with
me, I'd appreciate any- and everything anyone feels like email'ing to me.
Thanks!!

__
/ ) Bernie Cosell
/--< _ __ __ o _ BBN Sys & Tech, Cambridge, MA 02238
/___/_(<_/ (_/) )_(_(<_ cos...@bbn.com

Anthony A. Datri

unread,
Mar 4, 1989, 6:12:51 PM3/4/89
to
In article <36...@bbn.COM> cos...@BBN.COM (Bernie Cosell) writes:

Hey, weren't you on Love Boat?

Can someone tell me just what Perl ***is***? I've seen lots of talk about it,
none of which gives the slightest idea what it actually is. Just like that
Satanic Verses book -- lots of news coverage, but no one actually gives a clue
what it's about or why certain groups are outraged by it.
--
@disclaimer(Any concepts or opinions above are entirely mine, not those of my
employer, my GIGI, my VT05, or my 11/34)
beak is@>beak is not
Anthony A. Datri @SysAdmin(Stepstone Corporation) a...@stepstone.com stpstn!aad

Larry Wall

unread,
Mar 8, 1989, 2:22:48 PM3/8/89
to
: Can someone tell me just what Perl ***is***? I've seen lots of talk about it,

: none of which gives the slightest idea what it actually is. Just like that
: Satanic Verses book -- lots of news coverage, but no one actually gives a clue
: what it's about or why certain groups are outraged by it.

Certain groups outraged by perl? I hope not. Gulp...

Anyway, you asked for it. I could go on all day about what perl is and bore
you to tears. I'll attempt to restrain myself.

Perl is a language that partially sacrifices one aspect of "Unix philosopy"
(namely the toolbox approach) in order to collect many other aspects of "Unix
philosophy" into one spot. Perl is a language for C programmers who want
to do shellish, sedish and awkish things without having to write a spaghetti
bowl full of pipes and obscure Unix commands. The toolbox approach has its
place, but sometimes the solution in Perl is more readable than the
corresponding solution in shell. I like it, but then, I'm just a little
biased on that subject. :-)

For more info, here's the hype paragraph from perl 3.0 (alpha). (Note
that 3.0 isn't released yet--2.0 didn't handle binary data or dbm files.)


Perl is a interpreted language optimized for scanning arbi-
trary text files, extracting information from those text
files, and printing reports based on that information. It's
also a good language for many system management tasks. The
language is intended to be practical (easy to use, effi-
cient, complete) rather than beautiful (tiny, elegant,
minimal). It combines (in the author's opinion, anyway)
some of the best features of C, sed, awk, and sh, so people
familiar with those languages should have little difficulty
with it. (Language historians will also note some vestiges
of csh, Pascal, and even BASIC-PLUS.) Expression syntax
corresponds quite closely to C expression syntax. Unlike
most Unix utilities, perl does not arbitrarily limit the
size of your data--if you've got the memory, perl can slurp
in your whole file as a single string. And the hash tables
used by associative arrays grow as necessary to prevent
degraded performance. Perl uses sophisticated pattern
matching techniques to scan large amounts of data very
quickly. Although optimized for scanning text, perl can
also deal with binary data, and can make dbm files look like
associative arrays (where dbm is available). Setuid perl
scripts are safer than C programs through a dataflow tracing
mechanism which prevents many stupid security holes. If you
have a problem that would ordinarily use sed or awk or sh,
but it exceeds their capabilities or must run a little fas-
ter, and you don't want to write the silly thing in C, then
perl may be for you. There are also translators to turn
your sed and awk scripts into perl scripts.

Perl 2.0 was distributed in comp.sources.unix. You can also ftp it
from jpl-devvax.jpl.nasa.gov (128.149.8.43) at patchlevel 18. Version 3.0
will be available Real Soon Now, depending on how the Magellan shuttle launch
(and my little part in it) goes.

Well, that's enough for now, I think. Oh, to answer the question in the
original article, one place to get sample perl scripts is in the perl
distribution itself. Look in the eg subdirectory. Also, the regression
tests are all written in perl. So is the sed-to-perl translator.

Larry Wall
lw...@jpl-devvax.jpl.nasa.gov

0 new messages