home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / perl-faq / part1 < prev    next >
Encoding:
Text File  |  1995-07-25  |  42.2 KB  |  913 lines

  1. Subject: comp.lang.perl FAQ 1/5 - Availability
  2. Newsgroups: comp.lang.perl,comp.answers,news.answers
  3. From: spp@vx.com
  4. Date: 15 Nov 1994 10:09:28 GMT
  5.  
  6. Archive-name: perl-faq/part1
  7. Version: $Id: part1,v 2.3 1994/11/07 18:05:23 spp Exp spp $
  8. Posting-Frequency: bi-weekly
  9.  
  10. This posting contains answers to general information and availability
  11. questions.  The following questions are answered in this posting: 
  12.  
  13.  
  14. 1.1) What is Perl?
  15.     
  16.     Perl is a compiled scripting language written by Larry Wall*.
  17.  
  18.     Here's the beginning of the description from the perl(1) man page:
  19.  
  20.     Perl is an interpreted language optimized for scanning arbi-
  21.     trary  text  files,  extracting  information from those text
  22.     files, and printing reports based on that information.  It's
  23.     also  a good language for many system management tasks.  The
  24.     language is intended to be practical  (easy  to  use,  effi-
  25.     cient,  complete)  rather  than  beautiful  (tiny,  elegant,
  26.     minimal).  It combines (in  the  author's  opinion,  anyway)
  27.     some  of the best features of C, sed, awk, and sh, so people
  28.     familiar with those languages should have little  difficulty
  29.     with  it.  (Language historians will also note some vestiges
  30.     of csh, Pascal,  and  even  BASIC-PLUS.)  Expression  syntax
  31.     corresponds  quite  closely  to C expression syntax.  Unlike
  32.         most Unix utilities, perl does  not  arbitrarily  limit  the
  33.     size  of your data--if you've got the memory, perl can slurp
  34.         in your whole file as a  single  string.   Recursion  is  of
  35.     unlimited  depth.   And  the hash tables used by associative
  36.         arrays grow as necessary to  prevent  degraded  performance.
  37.     Perl  uses sophisticated pattern matching techniques to scan
  38.         large amounts of data very quickly.  Although optimized  for
  39.     scanning  text, perl can also deal with binary data, and can
  40.         make dbm files look like associative arrays  (where  dbm  is
  41.     available).   Setuid  perl scripts are safer than C programs
  42.         through a dataflow tracing  mechanism  which  prevents  many
  43.     stupid  security  holes.   If  you have a problem that would
  44.         ordinarily use sed or awk or sh, but it exceeds their  capa-
  45.     bilities  or must run a little faster, and you don't want to
  46.         write the silly thing in C, then perl may be for you.  There
  47.     are  also  translators to turn your sed and awk scripts into
  48.         perl scripts.  OK, enough hype.
  49.  
  50.  
  51. 1.2) What are perl4 and perl5, are there any differences?
  52.  
  53.     Perl4 and perl5 are different versions of the language.  Perl4 was the
  54.     previous release, and perl5 is "Perl: The Next Generation."
  55.     Perl5 is, essentially, a complete rewrite of the perl source code
  56.     from the ground up.  It has been modularized, object oriented, 
  57.     tweaked, trimmed, and optimized until it almost doesn't look like
  58.     the old code.  However, the interface is mostly the same, and
  59.     compatibility with previous releases is very high.
  60.  
  61.  
  62. 1.3) What features does perl5 provide over perl4?
  63.  
  64.     If you get the newest source (from any of the main FTP sites), you will
  65.     find a directory full of man pages (possibly to be installed as section
  66.     1p and 3pm) that discuss the differences, new features, old
  67.     incompatibilies and much more.  Here, however, are some highlights as
  68.     to the new feature and old incompatibilites.
  69.  
  70.     * Enhanced Usability:  Perl code can now be written in a much more
  71.     legible style.  Regular expressions have been enhanced to allow
  72.     minimal matches, conditionals, and much more.  Cryptic variable
  73.     names (although still supported) have been aliased to new
  74.         nmemonics, using the "English" module, allowing old scripts to run
  75.         and new scripts to be readable.  Error messages and optional
  76.         warnings are more informative and will catch many common mistakes.
  77.         See the perldiag(1) man page, which contains pithy prose from Larry
  78.         Wall* on each and every possible muttering perl might spout at you.
  79.     * Simplified Grammar:  The new yacc grammar is one half the size of
  80.     the old one.  Many of the arbitrary grammer rules have been
  81.     regularized.  The number of reserved words has been cut by 2/3.
  82.     * Lexical Scoping:  Perl variables may now be declared within a
  83.     lexical scope, similar to C's "auto" variables.  This is a
  84.     great improvement on efficiency and contributes to better
  85.     privacy.  See the my() entry in perlfunc(1).
  86.     * Arbitrarily nested data structures:  Full fledged multidimensional
  87.     arrays.  Any scalar value, including an array element, may now
  88.     contain a reference to any other variable or subroutine.
  89.     Easily created anonymous variables and subroutines.  See
  90.         perlref(1).
  91.     * Modularity and Reusability:  The Perl library is now defined in
  92.     terms of modules which can be easily shared among various
  93.     packages.  Packages can import any or all of a module's
  94.     published interface.  See perlmod(1), perlsub(1), and
  95.         Exporter(3pm). 
  96.     * Object-oriented programming:  A package can function as a class.
  97.     Dynamic multiple inheritance and virtual methods are supported
  98.     in a straight-forward manner with little new syntax.  Filehandles
  99.     are now treated as objects.  See perlobj(1), perlmod(1), and
  100.         FileHandle(3pm). 
  101.     * Embeddible and Extensible:  Perl can be easily embedded in C/C++
  102.     approlications, and can either call or be called by your
  103.     routines through a documented interface.  The XS preprocessor
  104.     is provided to make it easy to glue your C/C++ routines into
  105.     Perl.  Dynamic loading of modules is supported.  See perlapi(1),
  106.         perlcall(1), and DynaLoader(3pm).
  107.     * POSIX compliant:  A major new module is the POSIX module, which
  108.     provides access to all available POSIX routines and definitions.
  109.         Seee POSIX(3pm).
  110.     * Package constructors and destructors:  The new BEGIN and END blocks
  111.         provide means to capture control as a package is being compiled and
  112.         after the program exits.  As a degenerate case, they work just like
  113.         awk's BEGIN and END when you use the -p or -n switches.  See
  114.         perlmod(1). 
  115.     * Multiple simultaneous DBM implementations:  A perl program now has
  116.         access to DBM, NDBM, SDBM, GDBM and Berkeley DB files in the same
  117.         script.  The dbmopen interface has been generalized to allow any
  118.         variable to be tied to an object class which defines its access
  119.         methods.  tie/untie now preferable to dbmopen/dbmclose.  See the
  120.         tie() entry in perlfunc(1) and the DB_File(3pm) man pages.
  121.     * Subroutine definitions may now be autoloaded:  The AUTOLOAD mechanism
  122.         allows any arbitrary semantics to undefined subroutine calls.  See
  123.         the section on Autoloading in the perlsub(1) manpage.
  124.     * Regular Expression Enhancements:  Qualifiers may be followed by a "?"
  125.     to signify that they should be non-greedy.  A "?" directly after
  126.     an opening paren indicates non backreference grouping and the next
  127.     character determines the purpose of the match (?:a|b|c) will match
  128.     any of a b or c without producing a backreference, (?=stuff) does
  129.     a non-eating look ahead to assure that the next thing is stuff, 
  130.     (?!nonsense) looks ahead to assure that the next thing must not
  131.     be "nonsense".  Embedded whitespace and comments for readability.  
  132.     A consistent extensibility mechanism has been added that is 
  133.     upwardly compatible with all old regexps.  Variables may now be 
  134.     interpoled literally into a pattern with \Q or the quotemeta 
  135.     fuction, which works like \U but backwhacks non-alphanumerics.  
  136.     New m and s "flags" for pattern matching force multi- or 
  137.     single-line matching.  The "s" makes "." match "\n".  \A and
  138.     \Z anchor matches to the beginning and end of a string and ignore
  139.     multiline semantics.  \G matches where the previous m//g or s///g
  140.     left off.
  141.     * The -w (warnings) switch is much more informative.
  142.     * References and Objects (see t/op/ref.t) for examples.
  143.     * => is a synonum for comma and helps group paired arguments, such
  144.     as initializers for associative arrays and named arguments to
  145.     subroutines.
  146.     * All functions, even predeclared subroutines, are treated as list
  147.         operators or unary operators.  Parens are optional. 
  148.     * Flattened interpreter:  Compare perl4's eval.c with perl5's pp.c.
  149.     Compare perl4's 900 line interpreter look with perl5's one line.
  150.     * eval is now treated like a subroutine call, meaning (among other
  151.     things) you can return from it.
  152.     * format value lists may be spread over multiple lines with a do {}
  153.     block.
  154.     * flags on the #! line are interpreted even if the script wasn't
  155.     invoked directly.
  156.     * ?: is now an lvalue.
  157.     * list context now propogates to the right side of && and ||, and
  158.     as the 2nd and 3rd arguments of ?:
  159.     * preferred package delimeter now :: rather than '.
  160.     * new "and" and "or" operators, like && and || but with a lower
  161.     precedence than comma, so they work better with list operators.
  162.     * New functions abs(), chr(), uc(), ucfirst(), lc(), and lcfirst()
  163.     * require(number) checks to see that the version is at least that
  164.     version
  165.     * qw//, which is equivalent to split(' ', q//)
  166.     * assignment of a reference to a glob replaces the single element
  167.     of the glob corresponding to the reference type:
  168.         *foo = \$bar, * foo = \&bletch;
  169.     * filehandle methods are supported:
  170.     output_autoflush STDOUT 1;
  171.     * Autoload stubs can now call the replacement subroutine with
  172.     goto &realsub.
  173.     * Subroutines can be defined lazily in any package by declaring
  174.     an AUTOLOAD routine, which will be called if a non-existant
  175.     subroutine is called in that package.
  176.     * "use" and "no" subsume many feautres.  "use Module LIST" is
  177.     short for "BEGIN { require Module; import Module LIST }"
  178.     "no" is identical, except that it calls "unimport" instead.
  179.     "use integer" and variations of "use strict [vars,refs,subs]"
  180.     were implemented through new modules.
  181.  
  182. (Thanks to Tom Christiansen* for this section)
  183.  
  184.  
  185. 1.4) Where can I get docs on perl5?
  186.   
  187.     The complete perl documentation is available with the Perl
  188.     distribution, or can be accessed from the following sites.
  189.     Note that the PerlDoc ps file is 240 pages long!! 
  190.   
  191.         http://www.metronet.com/0/perlinfo/perl5/manual/perl.html
  192.         ftp://ftp.uu.net/languages/perl/PerlDoc.ps.gz
  193.         ftp://prep.ai.mit.edu/pub/gnu/PerlDoc.ps.gz
  194.         ftp://ftp.cbi.tamucc.edu/pub/duff/Perl/PerlDoc.ps.gz
  195.         ftp://www.metronet.com/pub/perlinfo/perl5/manual/PerlDoc.ps.gz
  196.         http://web.nexor.co.uk/perl/perl.html                    (Europe)
  197.         ftp://ftp.zrz.tu-berlin.de/pub/unix/perl/PerlDoc.ps.gz  (Europe)
  198.         ftp://ftp.cs.ruu.nl/pub/PERL/perl5.0/PerlDoc.ps.gz      (Europe)
  199.         ftp://sungear.mame.mu.oz.au/pub/perl/doc/PerlDoc.ps.gz  (Oz)
  200.   
  201.  
  202. 1.5) Will perl5 break my perl4 scripts?
  203.   
  204.     In general, no.  However, certain bad old practices have become highly
  205.     frowned upon.  The following are the most important of the known
  206.     incompatibilies between perl4 and perl5.  See perltrap(1) for more 
  207.     details.
  208.   
  209.     * "@" ***ALWAYS*** interpolate in double quoted strings.  Non-array
  210.     "@"s must be escaped: 
  211.         Mail("foo@bar.com") needs to be
  212.         Mail("foo\@bar.com"); 
  213.     The compiler catches this.
  214.     * "open FILE || die" needs to be "open(FILE) || die".  The compiler
  215.       forgives you for this, but won't stop complaining until you fix it.
  216.     * Barewords are no longer (necessarily) strings: they will actually
  217.       call the function (if it existed when that code was compiled)
  218.       instead of returning a string of that value.  Check your 
  219.       signal handlers.  The 'use strict subs' pragma (see strict(3pm))
  220.       will help you with this.
  221.     * "shift @x + 20" needs to be "shift(@x) + 20" because of precedence,
  222.       and likewise "$y = scalar keys %foo + 30" needs to be instead 
  223.       "$y = scalar keys(%foo) + 30".
  224.     * The internal symbol table is called %{PACKAGE::} for any given 
  225.       package.  It used to be %{_PACKAGE}.
  226.     * You may no longer (attempt to) write to read-only variables, like $1,
  227.       or assign to a substr() past the end of a string.
  228.     * Various deprecated practices elicit warning messages.
  229.   
  230.  
  231. 1.6) When will Perl stabilize?
  232.   
  233. When asked at what point the Perl code would be frozen, Larry answere:
  234.   
  235.     Part of the redesign of Perl is to *allow* us to more or less freeze
  236.     the language itself.  It won't totally freeze, of course, but I think
  237.     the rate of change of the core of the language is asymptotically
  238.     approaching 0.  In fact, as time goes on, now that we have an official
  239.     extension mechanism, some of the things that are currently in the core
  240.     of the language may move out (transparently) as extensions.  This has
  241.     already happened to dbmopen().
  242.   
  243.     I've also been continuously reminding myself of what Henry Spencer
  244.     calls "second system syndrome", in which everything under the sun gets
  245.     added, resulting in a colossal kludge, like OS 360.  You'll find that
  246.     the new features in Perl 5 are all pretty minimalistic.  The
  247.     object-oriented features in particular added only one new piece of
  248.     syntax, a C++-style method call.
  249.   
  250.     : The whole idea
  251.     : Perl is to be a fast text-processing, system-maintenance, zero-startup
  252.     : time language. If it gets to be so large and complicated that it isn't
  253.     : fast-running and easy to use, it won't be to anyone's benefit.
  254.   
  255.     My motto from the start has been, "If it ain't broke, don't fix it."
  256.     I've been trying very hard not to remove those features from Perl that
  257.     make it what it is.  At the same time, a lot of streamlining has gone
  258.     into the syntax.  The new yacc file is about half the size of the old
  259.     one, and the number of official reserved words has been cut by 2/3.
  260.     All built-in functions have been unified (dualified?) as either list
  261.     operators or unary operators.
  262.   
  263.     : I really like a lot of the features in Perl, but in order for Perl to
  264.     : be useful on a long term basis, those features have to stay put. I
  265.     : bought the Camel book less than a year ago and it sounds like within
  266.     : another year it will be obsolete.
  267.   
  268.     The parts of Perl that the Camel book covers have not changed all that
  269.     much.  Most old scripts still run.  Many scripts from Perl version 1.0
  270.     still run.  We'll certainly be revising the Camel, but the new man
  271.     pages are split up such that it's pretty easy to ferret out the new
  272.     info when you want it.
  273.   
  274.     We did break a few misfeatures in going to Perl 5.  It seemed like the
  275.     first and last chance to do so.  There's a list of the
  276.     incompatibilities in the documentation. 
  277.   
  278.     : Not only is it a lot of work to recompile Perl
  279.     : on 20+ machines periodically, but it's hard to write scripts that are 
  280.     : useful in the long term if the guts of the language keep changing.
  281.     : (And if I keep having to buy new books. I keep hearing about new
  282.     : features of Perl 5 that aren't documented in any of the perl 5
  283.     : documentation that *I* can find.)
  284.   
  285.     I think you'll find a lot of folks who think that 4.036 has been a
  286.     pretty stable platform.
  287.   
  288.     Perl 5 is a special case.  I've been working on it for years.  (This is
  289.     part of the reason 4.036 has been so stable!)  There are many changes,
  290.     most of them for the better, I hope.  I don't expect the transition to
  291.     be without pain.  But that's why I stuck numbered versions out in your
  292.     bin directory, so that you can upgrade piecemeal if you like.  And
  293.     that's why I made the -w switch warn about many of the incompatibilities.
  294.   
  295.     And overriding all that, I've tried to keep it so that you don't have
  296.     to know much about the new stuff to use the old stuff.  You can upgrade
  297.     your *knowledge* piecemeal too.
  298.   
  299.     The extension mechanism is designed to take over most of the
  300.     evolutionary role from now on.  And it's set up so that, if you don't
  301.     have a particular extension, you know it right up at the front. 
  302.   
  303.     : Are there any plans to write a Perl compiler? While interpreted Perl
  304.     : is great for many applications, it would also be cool to be able to
  305.     : precompile many scripts. (Yes, I know you can undump things, but
  306.     : undump isn't provided with Perl and I haven't found a copy.) The
  307.     : creation of a perl library and dynamically-loadable modules seems
  308.     : like a step in that direction.  
  309.   
  310.     Yes, part of the design of Perl 5 was to make it *possible* to write a 
  311.     compiler for it.  It could even be done as an extension module, I
  312.     suppose.  Anyone looking for a master's thesis topic?
  313.   
  314.     In summary, almost every concern that you might think of has already
  315.     been (at least) thought about.  In a perfect world, every concern
  316.     could be addressed perfectly.  But in this world we just have to slog
  317.     through.
  318.   
  319.  
  320. 1.7) What's the difference between "perl" and "Perl"?
  321.  
  322.     32!  [ ord('p') - ord('P') ]  (Shouldn't that be 42, the Answer to the
  323.         Great Question of Life, the Universe, and Everything?  ;) 
  324.  
  325.     Larry now uses "Perl" to signify the language proper and "perl" the
  326.     implementation of it, i.e. the current interpreter.  Hence Tom's
  327.     quip that "Nothing but perl can parse Perl."
  328.  
  329.     On the other hand, the aesthetic value of casewise parallelism in
  330.     "awk", "sed", and "perl" as much require the lower-case version as "C",
  331.     "Pascal", and "Perl" require the upper-case version.  It's also easier
  332.     to type "Perl" in typeset print than to be constantly switching in
  333.     Courier. :-) 
  334.     
  335.     In other words, it doesn't matter much, especially if all you're doing
  336.     is hearing someone talk about the language; case is hard to distinguish
  337.     aurally. 
  338.  
  339.  
  340. 1.8) Is it a perl program or a perl script?
  341.  
  342.     It depends on whether you are talking about the perl binary or
  343.     something that you wrote using perl.  And, actually, even this isn't
  344.     necessarily true.
  345.  
  346.     "Standard" UNIX terminology is (roughly) this:  programs are compiled
  347.     into machine code once and run multiple times, scripts are translated
  348.     (by a program) each time they are used.  However, some say that a
  349.     program is anything written which is executed on a computer system.
  350.     Larry considers it a program if it is set in stone and you can't change
  351.     it, whereas if you can go in and hack at it, it's a script.  Of course,
  352.     if you have the source code, that makes just about anything a
  353.     script.  ;)
  354.  
  355.     In general, it probably doesn't really matter.  The terms are used
  356.     interchangeably.  If you particularly like one or the other, use it.  If
  357.     you want to call yourself a perl programmer, call them programs.  If
  358.     you want to call yourself a perl scripter, call them scripts.  Randal*
  359.     and I (at least) will call them hacks.  (See question 2.10 ;)
  360.  
  361. 1.9) Is perl difficult to learn?
  362.     
  363.     Not at all.  Many people find Perl extremely easy to learn.  There are
  364.     at least three main reasons for this.
  365.  
  366.     The first reason is that most of Perl has been derived from standard
  367.     utilities, tools, and languages that you are (probably) already
  368.     familiar with.  If you have any knowledge of the C programming language
  369.     and standard C library, the Unix Shell, sed and awk, Perl should be
  370.     simple and fun for you to learn.
  371.  
  372.     The second reason that Perl is easy to learn is that you only have to
  373.     know a very small subset of Perl to be able to get useful results.  In
  374.     fact, once you can master
  375.  
  376.         #!/usr/local/bin/perl
  377.      print "Hello, world\n";
  378.  
  379.     you can start writing Perl scripts.  In fact, you will probably never
  380.     have to (or be able to) know everything about Perl.  As you feel the
  381.     need or desire to use more sophisticated features (such as C structures
  382.     or networking), you can learn these as you go.  The learning curve for
  383.     Perl is not a steep one, especially if you have the headstart of having 
  384.     a background in UNIX.  Rather, its learning curve is gentle and
  385.     gradual, but it *is* admittedly rather long. 
  386.  
  387.     The third reason is that you can get immediate results from your
  388.     scripts.  Unlike a normal compiled language (like C or Pascal, for
  389.     example), you don't have to continually recompile your program every
  390.     time you change one little thing.  Perl allows you to experiment and
  391.     test/debug quickly and easily.  This ease of experimentation flattens
  392.     the learning curve even more.
  393.  
  394.     If you don't know C or UNIX at all, it'll be a steeper learning curve,
  395.     but what you then learn from Perl will carry over into other areas,
  396.     like using the C library, UNIX system calls, regular expressions, and 
  397.     associative arrays, just to name a few.  To know Perl is to know UNIX,
  398.     and vice versa. 
  399.  
  400.  
  401. 1.10) Should I program everything in Perl?
  402.  
  403.     Most definitely.  In fact, you should delete the binaries for sed, awk,
  404.     cc, gcc, grep, rm, ls, cat... well, just delete your /bin directory.
  405.  
  406.     But seriously, of course you shouldn't.  As with any job, you should
  407.     use the appropriate tool for the task at hand.  Just because a hammer 
  408.     will put screws into a piece of board, you probably don't want to do
  409.     that.
  410.  
  411.     While it's true that the answer to the question "Can I do (some
  412.     arbitrary task) in Perl?" is almost always "yes", that doesn't mean
  413.     this is necessarily a good thing to do.  For many people, Perl serves
  414.     as a great replacement for shell programming.  For a few people, it
  415.     also serves as a replacement for most of what they'd do in C.  But for
  416.     some things, Perl just isn't the optimal choice, such as tasks
  417.     requiring very complex data structures.
  418.  
  419. 1.11) How does Perl compare with other scripting languages, like Tcl, Python
  420.      or REXX?
  421.  
  422.     REXX is an interpreted programming language first seen on IBM systems.
  423.     Python is an interpreted programming language by Guido van Rossum*.
  424.     TCL is John Ousterhout*'s embeddable command language, designed just
  425.     for embedded command extensions, but lately used for larger
  426.     applications.  TCL's most intriguing feature for many people is the
  427.     tcl/tk toolset that allows for interpreted X-based tools.  Others use
  428.     it for its "expect" extension.
  429.  
  430.     To avoid any flamage, if you really want to know the answer to this
  431.     question, probably the best thing to do is try to write equivalent
  432.     code to do a set of tasks.  All three have their own newsgroups in
  433.     which you can learn about (but hopefully not argue about) these
  434.     languages.
  435.  
  436.     To find out more about these or other languages, you might also check
  437.     out David Muir Sharnoff*'s posting "Catalog of Compilers, Interpreters,
  438.     and Other Language Tools" which he posts to comp.lang.misc,
  439.     comp.sources.d, comp.archives.admin, and news.answers newsgroups.  It's
  440.     a comprehensive treatment of many different languages.  (Caveat lector:
  441.     he considers Perl's syntax "unappealing".)
  442.  
  443.  
  444. 1.12) How can I get Perl over the Internet?
  445.  
  446.     Perl is available from any comp.sources.misc archive.  You can use an
  447.     archie server (see the alt.sources FAQ in news.answers) to find these
  448.     if you want.
  449.  
  450.     Volume    Issues    Patchlevel and Notes
  451.     ------    ------    ------------------------------------------------
  452.       18    19-54    Patchlevel 3, Initial posting.
  453.       20    56-62    Patches 4-10    
  454.  
  455.     Since 1993, a number of archives have sprung up specifically for Perl
  456.     and Perl related items.  Larry maintains the official distribution
  457.     site (for both perl4.036 and perl5) at netlabs.  Probably the largest
  458.     archive is at the University of Florida.  In order of probability these
  459.     sites will have the sources.
  460.  
  461.     Site            IP                Directory and notes    
  462.     -----------        -------        ------------------------------- 
  463.     North America:
  464.     ftp.netlabs.com     192.94.48.152   /pub/outgoing/perl[VERSION]/
  465.     ftp.cis.ufl.edu        128.227.100.198 /pub/perl/src/[VERSION]/
  466.         prep.ai.mit.edu        18.71.0.38         /pub/gnu/perl5.000.tar.gz
  467.         ftp.uu.net          192.48.96.9        /languages/perl/perl5.000.tar.gz
  468.         ftp.khoros.unm.edu  198.59.155.28   /pub/perl/perl5.000.tar.gz
  469.         ftp.cbi.tamucc.edu  165.95.1.3        /pub/duff/Perl/perl5.000.tar.gz
  470.     ftp.metronet.com    192.245.137.1   /pub/perl/sources/
  471.         genetics.upenn.edu  128.91.200.37   /perl5/perl5_000.zip
  472.  
  473.     Europe:
  474.         ftp.cs.ruu.nl        131.211.80.17   /pub/PERL/perl5.0/perl5.000.tar.gz
  475.         ftp.funet.fi        128.214.248.6   /pub/languages/perl/ports/perl5/perl5.000.tar.gz
  476.         ftp.zrz.tu-berlin.de 130.149.4.40   /pub/unix/perl/perl5.000.tar.gz
  477.         src.doc.ic.ac.uk    146.169.17.5    /packages/perl5/perl5.000.tar.gz
  478.   
  479.     Australia:
  480.         sungear.mame.mu.oz.au 128.250.209.2 /pub/perl/src/5.0/perl5.000.tar.gz
  481.  
  482.     If there is a site in Asia or Japan, please tell us about it.  Thanks! 
  483.  
  484.     You can also retrieve perl via non-ftp methods:
  485.   
  486.         http: //src.doc.ic.ac.uk/packages/perl5/perl5.000.tar.gz
  487.         gopher:       //src.doc.ic.ac.uk/0/packages/perl5/perl5.000.tar.gz
  488.  
  489.  
  490. 1.13) How can I get Perl via Email?
  491.  
  492.     The following is a list of known ftpmail sites.  Please attempt to use
  493.     the site closest to you with the ftp archive closest to it.  Many of
  494.     these sites already have perl on them.  For information on how to use
  495.     one of these sites, send email containing the word "help" to the
  496.     address.
  497.  
  498.     United States:
  499.         Massachusetts:    ftpmail@decwrl.dec.com
  500.         New Jersey:        bitftp@pucc.princeton.edu
  501.         North Carolina:    ftpmail@sunsite.unc.edu
  502.  
  503.     Europe/UK:
  504.         Germany:        ftpmail@ftp.uni-stuttgart.de
  505.                 bitftp@vx.gmd.de
  506.         UK:            ftpmail@doc.ic.ac.uk
  507.  
  508.     Australia:        ftpmail@cs.uow.edu.au
  509.  
  510.     Henk P Penning* suggests that if you are in Europe you should try the
  511.     following (if you are in Germany or the UK, you should probably use one
  512.     of the servers listed above): 
  513.  
  514.         Email: Send a message to 'mail-server@cs.ruu.nl' containing:
  515.      begin
  516.      path your_email_address
  517.      send help
  518.      send PERL/INDEX
  519.      end
  520.     The path-line may be omitted if your message contains a normal
  521.     From:-line.  You will receive a help-file and an index of the
  522.     directory that contains the Perl stuff.
  523.  
  524.     If all else fails, mail to Larry usually suffices.
  525.  
  526.  
  527. 1.14) How can I get Perl via UUCP?
  528.  
  529.     There currently is no way of getting Perl via UUCP.  If anyone knows of
  530.     a way, please contact me.  The OSU site has discontinued the service.
  531.  
  532.  
  533. 1.15) Are there other ways of getting perl?
  534.  
  535.     Another possibility is to use UUNET, although they charge you for it.
  536.     You have been duly warned.  Here's the advertisement: 
  537.  
  538.            Anonymous Access to UUNET's Source Archives
  539.  
  540.                  1-900-GOT-SRCS
  541.  
  542.     UUNET now provides access to its extensive collection of UNIX
  543.     related sources to non- subscribers.  By  calling  1-900-468-7727
  544.     and  using the login "uucp" with no password, anyone may uucp any
  545.     of UUNET's on line source collection.  Callers will be charged 40
  546.     cents  per  minute.   The charges will appear on their next tele-
  547.     phone bill.
  548.  
  549.      The file uunet!/info/help contains instructions.   The  file
  550.     uunet!/index//ls-lR.Z  contains  a  complete  list  of  the files 
  551.     available  and is  updated daily.   Files ending  in Z need to be 
  552.     uncompressed before being used.  The file uunet!~/compress.tar is
  553.     a tar archive containing the C sources for the uncompress program. 
  554.  
  555.      This service provides a  cost  effective  way  of  obtaining
  556.     current  releases  of sources without having to maintain accounts
  557.     with UUNET or some other service.  All modems  connected  to  the
  558.     900  number  are  Telebit T2500 modems.  These modems support all
  559.     standard modem speeds including PEP, V.32 (9600), V.22bis (2400),
  560.     Bell  212a  (1200), and Bell 103 (300).  Using PEP or V.32, a 1.5
  561.     megabyte file such as the GNU C compiler would cost $10  in  con-
  562.     nect  charges.   The  entire  55  megabyte X Window system V11 R4
  563.     would cost only $370 in connect time.  These costs are less  than
  564.     the  official  tape  distribution fees and they are available now
  565.     via modem.
  566.  
  567.               UUNET Communications Services
  568.            3110 Fairview Park Drive, Suite 570
  569.              Falls Church, VA 22042
  570.              +1 703 876 5050 (voice)
  571.               +1 703 876 5059 (fax)
  572.                 info@uunet.uu.net
  573.  
  574.  
  575. 1.16) Has perl been ported to machine FOO?
  576.  
  577.     Perl runs on virtually all Unix machines simply by following the hints
  578.     file and instructions in the Configure script.  This auto-configuration
  579.     script allows Perl to compile on a wide variety of platforms by
  580.     modifying the machine specific parts of the code.  For most Unix
  581.     systems, or VMS systems for v5 perl, no porting is required.  Try to
  582.     compile Perl on your machine.  If you have problems, examine the README
  583.     file carefully.  If all else fails, send a message to comp.lang.perl
  584.     and crosspost to comp.sys.[whatever], there's probably someone out
  585.     there that has already solved your problem and will be able to help you
  586.     out. 
  587.  
  588.     Perl has been ported to many non-Unix systems, although currently there
  589.     are no v5 ports.  All of the following are mirrored at
  590.     ftp.cis.ufl.edu:/pub/perl/src/[OS]/.  The following are the (known)
  591.     official distribution points.  Please contact the porters directly
  592.     (when possible) in case of questions on these ports.
  593.  
  594.     * MS-DOS binaries and source are available at ftp.ee.umanitoba.ca
  595.       [130.179.8.47] in /pub/msdos/perl  
  596.       There are currently half a dozen different ports for MS-DOS.
  597.       BigPerl4 (v3) is perl4.036 compiled with the Watcom C/386
  598.       compiler (32-bit, flat-memory model C compiler) with the
  599.       following features:
  600.         * Up to 32MB of memory can be used.
  601.         * Supports virtual memory.
  602.         * Works under Windows 3.1 (however, a second copy of perl cannot
  603.           be spawned under Windows).
  604.         * The perl debugger can be used.
  605.         * Contains GDBM support.
  606.  
  607.     * Windows/NT binaries are available from ftp.cis.ufl.edu.  Does
  608.       anyone know the official distribution point?  I got these from
  609.       archive.cis.ohio-state.edu quite awhile back.
  610.  
  611.     * Machintosh binaries and source are available from nic.switch.ch
  612.       [130.59.1.40] in /software/mac/perl.
  613.       Version 4.1.3 is perl4.036 compiled with the MPW C compiler
  614.         * Mac_Perl_413_src.sit.bin        Sources
  615.         * Mac_Perl_413_tool.sit.bin        MPW Tool
  616.         * Mac_Perl_413_appl.sit.bin        Standalone Application
  617.       There is a mailing list for discussing Macintosh Perl.  Contact
  618.       "mpw-perl-request@iis.ee.ethz.ch".
  619.  
  620.       Timothy Murphy* also ported a version of perl to the Macintosh
  621.       using Think C.  It has probably been abandoned in favour of the
  622.       MPW port, but is still available at ftp.maths.tcd.ie
  623.       [134.266.81.10] in the directory /pub/Mac/perl-4.035/.
  624.  
  625.     * OS/2 sources are also available at ftp.cis.ufl.edu in
  626.       /pub/perl/src/os2.  This appears to have been abandoned and added
  627.       to the official distribution.  See the directory os2 in the perl5
  628.       sources.
  629.  
  630.     * VMS systems should be able to build directly from the standard
  631.       distribution.
  632.  
  633.  
  634. 1.17) How do I get Perl to compile on Solaris?
  635.  
  636.     The following directions are for perl, version 4.  Perl, version 5,
  637.     should compile more easily.  If not, send mail to The Perl Porters
  638.     Mailing List (perl5-porters@isu.edu)
  639.  
  640.     John Lees* reports:
  641.  
  642.         I have built perl on Solaris 2.1, 2.2 beta, and 2.2 FCS. Take
  643.     /usr/ucb out of your path and do not use any BSD/UCB libraries.
  644.     Only -lsocket, -lnsl, and -lm are needed. You can use the hint for
  645.     Solaris 2.0, but the one for 2.1 is wrong. Do not use vfork. Do not
  646.     use -I/usr/ucbinclude.  The result works fine for me, but of couse
  647.     does not support a couple of BSDism's.
  648.  
  649.     Casper H.S. Dik* reports
  650.  
  651.         You must remove all the references to /usr/ucblib AND
  652.         /usr/ucbinclude.  And ignore the Solaris_2.1 hints. They are wrong.
  653.         The undefining of vfork() probably has to do with the confusion it 
  654.         gives to the compilers.  If you use cc, you mustn't compile
  655.     util.c/tutil.c  with -O.  I only used the following libs: -lsocket 
  656.     -lnsl -lm (there is a problem with -lmalloc)
  657.  
  658.     Michael D'Errico* reports:
  659.  
  660.         If you are using Solaris 2.x, the signal handling is broken.  If
  661.     you set up a signal handler such as 'ripper' it will be forgotten
  662.     after the first time the signal is caught.  To fix this, you need
  663.     to recompile Perl.  Just add '#define signal(x,y) sigset((x),(y))'
  664.     after the '#include <signal.h>' directive in each file that it
  665.     occurs, then make it again. 
  666.  
  667.  
  668. 1.18) How do I get Perl to compile on a Next?
  669.  
  670.     According to Andreas Koenig*, under NeXTstep 3.2, both perl4.036 and
  671.     perl5.000 compile with the supplied hints file. 
  672.  
  673.     However, Bill Eldridge* provides this message to help get perl4.036 on
  674.     NeXTstep 3.0 to work: 
  675.  
  676.         To get perl to compile on NeXTs, you need to combine the ANSI
  677.         and BSD headers:
  678.  
  679.         cd /usr/include
  680.         mkdir ansibsd
  681.         cd ansibsd
  682.         ln -s ../ansi
  683.         ln -s ../bsd
  684.  
  685.         Then, follow the configuration instructions for NeXTs, *replacing*
  686.         all mention of -I/usr/include/ansi or -I/usr/include/bsd with
  687.         -I/usr/include/ansibsd.
  688.  
  689.  
  690. 1.19) What extensions are available from Perl and where can I get them?
  691.   
  692.     Some of the more popular extensions include those for windowing,
  693.     graphics, or data base work.  See perlmod(1). 
  694.   
  695.     Tk (as in tcl/tk, but sans tcl) 
  696.  
  697.       ftp://ftp.cis.ufl.edu/pub/perl/src/tkperl/tkperl5a5.tar.gz
  698.       ftp://ftp.khoros.unm.edu/pub/perl/extensions/tkperl5a5.tar.gz
  699.       ftp://ftp.metronet.com/pub/perlinfo/perl5/tkperl/tkperl5a5.tar.gz
  700.       ftp://ftp.cs.ruu.nl/pub/PERL/perl5.0/tkperl5a5.tar.gz
  701.       ftp://black.ox.ac.uk/src/ALPHA/tkperl5a5.tar.gz
  702.  
  703.     Curses (standard C library)
  704.       ftp://ftp.ncsu.edu/pub/math/wsetzer/cursperl5a6.tar.gz
  705.       ftp://ftp.metronet.com/pub/perlinfo/perl5/cursperl5a6.tar.gz
  706.       ftp://ftp.cs.ruu.nl/pub/PERL/perl5.0/cursperl5a6.tar.gz
  707.  
  708.     Msql (SQL)
  709.       ftp://ftp.zrz.TU-Berlin.DE/pub/unix/perl/MsqlPerl-a1.tgz
  710.       ftp://ftp.khoros.unm.edu/pub/perl/extensions/MsqlPerl-a1.tgz
  711.       ftp://ftp.metronet.com/pub/perlinfo/perl5/MsqlPerl5-a1.tgz
  712.       ftp://ftp.cs.ruu.nl/pub/PERL/perl5.0/MsqlPerl-a1.tar.gz
  713.  
  714.     Sx (Athena & Xlib)
  715.       ftp://ftp.pasteur.fr/pub/Perl/Sx.tar.gz
  716.       ftp://ftp.khoros.unm.edu/pub/perl/extensions/Sx.tar.gz
  717.       ftp://ftp.metronet.com/pub/perlinfo/perl5/Sx.tar.gz
  718.       ftp://ftp.cs.ruu.nl/pub/PERL/perl5.0/PerlDoc.ps.gz
  719.  
  720. 1.20) What is dbperl and where can I get it?
  721.  
  722.     Many database-oriented extensions to Perl have been written.
  723.     Basically, these use the usub mechanism (see the usub/ subdirectory) in
  724.     the source distribution) to link in a database library, allowing
  725.     embedded calls to Informix, Ingres, Interbase, Oracle and Sybase.
  726.  
  727.     Here are the authors of the various extensions:
  728.  
  729.     What            Target DB       Who
  730.     --------        -----------     ----------------------------------------
  731.     ?Infoperl       Informix        Kurt Andersen (kurt@hpsdid.sdd.hp.com)
  732.     Ingperl        Ingres        Tim Bunce (timbo@ig.co.uk) and Ted Lemon
  733.     Interperl       Interbase       Buzz Moschetti (buzz@bear.com)
  734.     Isqlperl        Informix        William Hails, bill@tardis.co.uk
  735.     Oraperl         Oracle          Kevin Stock (kstock@Auspex.com)
  736.     Pgperl        Postgres        Igor Metz (metz@iam.unibe.ch)
  737.     *Sqlperl        Ingres          Ted Lemon (mellon@ncd.com)
  738.     Sybperl         Sybase          Michael Peppler (mpeppler@itf.ch)
  739.     Uniperl        Unify 5.0        Rick Wargo (rickers@coe.drexel.edu)
  740.  
  741.     ? Does this one still exist?
  742.     * Sqlperl appears to have been subsumed by Ingperl
  743.  
  744.     Buzz Moschetti* has organized a project to create a higher level
  745.     interface to will allow you to write your queries in a database-
  746.     independent fashion.  If this type of project interests you, send mail
  747.     to <perldb-interest-request@vix.com> and asked to be placed on the
  748.     "perldb-interest" mailing lists.
  749.  
  750.     Here's a bit of advertising from Buzz:
  751.  
  752.     Perl is an interpreted language with powerful string, scalar, and
  753.     array processing features developed by Larry Wall that "nicely
  754.     bridges the functionality gap between sh(1) and C."  Since
  755.     relational DB operations are typically textually oriented, perl is
  756.     particularly well-suited to manage the data flows.  The C source
  757.     code, which is available free of charge and runs on many platforms,
  758.     contains a user-defined function entry point that permits a
  759.     developer to extend the basic function set of the language.  The
  760.     DBperl Group seeks to exploit this capability by creating a
  761.     standardized set of perl function extensions (e.g. db_fetch(),
  762.     db_attach()) based the SQL model for manipulating a relational DB,
  763.     thus providing a portable perl interface to a variety of popular
  764.     RDMS engines including Sybase, Oracle, Ingres, Informix, and
  765.     Interbase.  In theory, any DB engine that implements a dynamic SQL
  766.     interpreter in its HLI can be bolted onto the perl front end with
  767.     predicatable results, although at this time backends exist only for
  768.     the aforementioned five DB engines. 
  769.  
  770.     The official archive for DBperl extensions is ftp.demon.co.uk:
  771.     /pub/perl/db.  It's the home of the evolving DBperl API Specification.
  772.     Here's an extract from the updated README there:
  773.  
  774.     DBI/        The home of the DBI archive. To join the DBI mailing list
  775.                 send your request to perldb-interest-REQUEST@vix.com
  776.  
  777.     DBD/        Database Drivers for the DBI ...
  778.      
  779.     Oracle/      By Tim Bunce (not yet ready!) 
  780.     Ingres/      By Tim Bunce (not yet started!) 
  781.  
  782.     mod/           Other Perl 5 Modules and Extensions ...
  783.  
  784.     Sybperl/    By Michael Peppler, mpeppler@itf.ch
  785.  
  786.  
  787.     perl4/         Perl 4 extensions (using the usub C interface)
  788.  
  789.        oraperl/   ORACLE 6 & 7  By Kevin Stock (sadly no longer on the net)
  790.        sybperl/   SYBASE 4      By Michael Peppler, mpeppler@itf.ch
  791.        ingperl/   INGRES        By Tim Bunce timbo@ig.co.uk and Ted Lemon
  792.        isqlperl/  INFORMIX      By William Hails, bill@tardis.co.uk
  793.        interperl/ INTERBASE     By Buzz Moschetti, buzz@bear.com
  794.        oraperl/   ORACLE 6 & 7  By Kevin Stock (sadly no longer on the net)
  795.        sybperl/   SYBASE 4      By Michael Peppler, mpeppler@itf.ch
  796.        ingperl/   INGRES        By Tim Bunce timbo@ig.co.uk and Ted Lemon
  797.        isqlperl/  INFORMIX      By William Hails, bill@tardis.co.uk
  798.        interperl/ INTERBASE     By Buzz Moschetti, buzz@bear.com
  799.        uniperl/   UNIFY 5.0     By Rick Wargo, rickers@coe.drexel.edu
  800.        pgperl/    POSTGRES      By Igor Metz, metz@iam.unibe.ch
  801.  
  802.        btreeperl/ NDBM perl extensions.   By John Conover, john@johncon.com
  803.        ctreeperl/ C-Tree perl extensions. By John Conover, john@johncon.com
  804.        duaperl/   X.500 Directory User Agent. By Eric Douglas.
  805.   
  806.     scripts/       Perl and shell scripts
  807.   
  808.        rdb/       RDB is a perl RDBMS for ASCII files. By Walt Hobbs,
  809.                     hobbs@rand.org 
  810.        shql/      SHQL is an interactive SQL database engine.  Written as a
  811.                     shell script, SHQL interprets SQL commands and
  812.                     manipulates flat files based on those commands. By
  813.                     Bruce Momjian, root@candle.uucp 
  814.        xbase/     Perl scripts for accessing xBase style files (dBase III) 
  815.  
  816.  
  817.    refinfo/       Reference information
  818.       
  819.        sqlsyntax/ Yacc and lex syntax and C source code for SQL1 and SQL2
  820.             from ftp.uu.net:/pub/uunet/published/oreilly/nutshell/yacclex, 
  821.             and a draft SQL3 syntax from Jeff Fried <jfried@informix.com>+      
  822.        formats/   Details of file formats such as Lotus 1-2-3 .WK1
  823.  
  824.     There are also a number of non SQL database interfaces for perl
  825.     available from ftp.demon.co.uk.  These include:
  826.  
  827.     Directory    Target System    Authors and notes
  828.     ---------    -------------    -------------------------------------------
  829.     btreeperl    NDBM extension    John Conover (john@johncon.com)
  830.     ctreeperl    CTree extension John Conover (john@johncon.com)
  831.     duaperl    X.500 DUA    Eric Douglas
  832.     rdb        RDBMS        Walt Hobbs (hobbs@rand.org)
  833.     shql    SQL Engine    Bruce Momjian (root@candle.uucp)
  834.  
  835.  
  836. 1.21) Which DBM should I use?
  837.  
  838.     As shipped, Perl (version 5) comes with interfaces for several DBM
  839.     packages (SDBM, old DBM, NDBM, GDBM, Berkeley DBM) that are not supplied  
  840.     but either come with your system are readily accessible via FTP.  SDBM
  841.     is guaranteed to be there.  For a comparison, see AnyDBM_File(3pm)
  842.     and DB_File(3pm).
  843.  
  844.     
  845. 1.22) Is there an SNMP aware Perl?
  846.  
  847.     snmperl was written by Guy Streeter (streeter@ingr.com), and was
  848.     posted in late February 1993 to comp.protocols.snmp.  It can be found
  849.     archived at one of two (known) places:
  850.  
  851.     Host liasun3.epfl.ch
  852.  
  853.     Location: /pub/net/snmp
  854.            FILE -rw-rw-r--       3407  Aug 11 1992  snmperl.README
  855.            FILE -rw-r--r--      17678  Aug 11 1992  snmperl.tar.Z
  856.  
  857.     Host ftp.cis.ufl.edu
  858.     Location: /pub/perl/scripts/snmp
  859.  
  860.     Here is the gist of the README:
  861.  
  862.     README  $Revision: 2.3 $
  863.  
  864.     This directory contains the source code to add callable C subroutines
  865.     to perl.  The subroutines implement the SNMP functions "get",
  866.     "getnext", and "set".  They use the freely-distributable SNMP package
  867.     (version 1.1b) from CMU.
  868.  
  869.     USE:
  870.       There are four subroutines defined in the callable interface:
  871.     snmp_get, snmp_next, snmp_set, and snmp_error.
  872.  
  873.       snmp_get and snmp_next implement the GET and GETNEXT operations,
  874.     respectively.  The first two calling arguments are the hostname and
  875.     Community string.  The IP address of the host, as a dotted-quad ASCII
  876.     string, may be used as the hostname.  The rest of the calling
  877.     arguments are a list of variables.  See the CMU package documentation
  878.     for how variables may be specified.
  879.       snmp_set also takes hostname and Community string as arguments.  The
  880.     remaining arguments are a list of triples consisting of variable name,
  881.     variable type, and value.  The variable type is a string, such as
  882.     "INTEGER" or "IpAddress".
  883.       snmp_get, snmp_next, and snmp_set return a list containing
  884.     alternating variables and values.  snmp_get and snmp_next will simply
  885.     omit non-existent variables on return.  snmp_set will fail completely
  886.     if one of the specified variables does not exist (or is read-only).
  887.       snmp_error will return a text string containing some error
  888.     information about the most recent snmp_get|next|set call, if it had an
  889.     error.
  890.  
  891.     OTHER NOTES:
  892.       I didn't find all the places where the CMU library writes to stderr
  893.     or calls exit() directly.
  894.       The changes I made to mib.c involve the formatting of variable values
  895.     for return to the caller.  I took out the descriptive prefix so the
  896.     string contains only the value.
  897.       Enumerated types are returned as a string containing the symbolic
  898.     representation followed in parentheses by the numeric.
  899.  
  900.     DISTRIBUTION and OWNERSHIP
  901.       perl and the CMU SNMP package have their own statements.  Read them.
  902.     The work I've done is free and clear.  Just don't say you wrote it if
  903.     you didn't, and don't say I wrote it if you change it.
  904.  
  905.     Guy Streeter
  906.     streeter@ingr.com
  907.     April 1, 1992 (not a joke!)
  908. Stephen P Potter        spp@vx.com        Varimetrix Corporation
  909. 2350 Commerce Park Drive, Suite 4                Palm Bay, FL 32905
  910. (407) 676-3222                           CAD/CAM/CAE/Software
  911.  
  912.  
  913.