Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!caesar.cs.montana.edu!milton!uw-beaver!fluke!inc From: inc@tc.fluke.COM (Gary Benson) Newsgroups: comp.lang.perl Subject: Re: what is perl? Summary: Perl Description, from on-line manual page. Message-ID: <13316@fluke.COM> Date: 16 Dec 89 00:07:57 GMT References: Sender: news@tc.fluke.COM Distribution: comp Organization: John Fluke Mfg. Co., Inc., Everett, WA Lines: 92 In article , xmjschm@mbcrrb.harvard.edu (Mike Schmelzer) writes: > I think the subject line says it all. > > It would be nice if someone would explain briefly Perl's > history, utility, capabilities and availablity. > -- > === Mike Schmelzer === xmjschm@mbcrr.harvard.edu ====== 617-732-3746 ======= I'm not sure if this answers all your questions, but it at least answers the subject line, "What is PERL?" I took it from the online manual page here at Fluke. Perhaps others can fill in other details for you. PERL(PUBLIC) UNIX Programmer's Manual PERL(PUBLIC) NAME perl - Practical Extraction and Report Language SYNOPSIS perl [options] filename args 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. Upon startup, perl looks for your script in one of the fol- lowing places: 1. Specified line by line via -e switches on the command line. 2. Contained in the file specified by the first filename on the command line. (Note that systems supporting the #! notation invoke interpreters this way.) 3. Passed in implicitly via standard input. This only works if there are no filename arguments--to pass argu- ments to a stdin script you must explicitly specify a - for the script name. After locating your script, perl compiles it to an internal form. If the script is syntactically correct, it is exe- cuted. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- The entire manual page is quite lengthy, so I will not duplicate it here. This ought ought to be enough to pique your interest, though! Here in Fluke's Tech Pubs group, we use a PERL script for scanning "clear text" files and inserting appropriate typesetting codes for sending to other software for generating typeset and/or fully made-up pages. The original script was written by a programmer, and was commented well enough (and structured in tidy modules) such that I, with hardly any real programming training or experience, can modify it as we find new requirements. There are peopel here who have created new modules for me by first writing the application in awk, then translating. Sorry, I do not know the name of the awk-to-PERL translator. Good luck; I hope this has helped answer some of the questions about what PERL is. Gary Benson, inc@tc.fluke.COM