Perl (was Re: Pearl, What is it?)
Randal Schwartz
merlyn at iwarp.intel.com
Thu Sep 13 03:26:31 AEST 1990
In article <1990Sep11.211401.1556 at ccu1.aukuni.ac.nz>, russell at ccu1 (Russell J Fulton;ccc032u) writes:
| I noticed the two scripts posted in response to a request for reaper programs
| were Pearl scripts. We are relatively new to UNIX an I have not come across
| Pearl before. Could some kind soul please send me a brief description of
| Pearl, and information on where to get it. (Or a pointer to where I can get
| the information.)
|
| It looks like a powerful tool for doing admin work!
A public reply, in case there are other lurkers with the same request...
Perl is a freely available (under the GNU Copyleft) program written by
Larry Wall, the author of the 'rn' newsreader (and a prolific hacker
and writer, I might add).
Perl is a mixture of sed, awk, sh, C, and your favorite wishlist.
It's best at handling nearly any task that you would have used a
convoluted shell script for, and then some. It's also *very*
portable, thanks to a fairly robust Configure script-- it's even
running on MS-DOS.
Well, here, let me quote the manpage...
NAME
perl - Practical Extraction and Report Language
DESCRIPTION
Perl is an 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. Recursion is of
unlimited depth. 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 capa-
bilities or must run a little faster, 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. OK, enough hype.
Perl can be fetched anon-ftp from devvax.jpl.nasa.gov:/pub/perl.3.0,
as well as anon-uucp from osu-cis. Many other sites also stock Perl.
Perl was posted to comp.sources.unix a while back.
Support is excellent. Perl has its own newsgroup "comp.lang.perl" and
mailing list "perl-users-request at virginia.edu". Larry reads and posts
frequently, and in his spare time even answers private mail questions.
He's fast to respond to bugs/feature-wishlists. (Perl 3.0 is already
at patchlevel 28 after having been released only 9 months ago.)
Perl comes with a 70-page manpage, and will soon be documented in a
Nutshell Handbook with over 200 pages of full examples, detailed
descriptions of operations, tutorials, and cookbook-style Perl
recipes.
Read (and post to!) comp.lang.perl for further information.
print "Just another Perl hacker,"
--
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III |
| merlyn at iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn |
\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/
More information about the Comp.unix.admin
mailing list