xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/pod/perlfaq1.pod (revision 0:68f95e015346)
1*0Sstevel@tonic-gate=head1 NAME
2*0Sstevel@tonic-gate
3*0Sstevel@tonic-gateperlfaq1 - General Questions About Perl ($Revision: 1.14 $, $Date: 2003/11/23 08:02:29 $)
4*0Sstevel@tonic-gate
5*0Sstevel@tonic-gate=head1 DESCRIPTION
6*0Sstevel@tonic-gate
7*0Sstevel@tonic-gateThis section of the FAQ answers very general, high-level questions
8*0Sstevel@tonic-gateabout Perl.
9*0Sstevel@tonic-gate
10*0Sstevel@tonic-gate=head2 What is Perl?
11*0Sstevel@tonic-gate
12*0Sstevel@tonic-gatePerl is a high-level programming language with an eclectic heritage
13*0Sstevel@tonic-gatewritten by Larry Wall and a cast of thousands.  It derives from the
14*0Sstevel@tonic-gateubiquitous C programming language and to a lesser extent from sed,
15*0Sstevel@tonic-gateawk, the Unix shell, and at least a dozen other tools and languages.
16*0Sstevel@tonic-gatePerl's process, file, and text manipulation facilities make it
17*0Sstevel@tonic-gateparticularly well-suited for tasks involving quick prototyping, system
18*0Sstevel@tonic-gateutilities, software tools, system management tasks, database access,
19*0Sstevel@tonic-gategraphical programming, networking, and world wide web programming.
20*0Sstevel@tonic-gateThese strengths make it especially popular with system administrators
21*0Sstevel@tonic-gateand CGI script authors, but mathematicians, geneticists, journalists,
22*0Sstevel@tonic-gateand even managers also use Perl.  Maybe you should, too.
23*0Sstevel@tonic-gate
24*0Sstevel@tonic-gate=head2 Who supports Perl?  Who develops it?  Why is it free?
25*0Sstevel@tonic-gate
26*0Sstevel@tonic-gateThe original culture of the pre-populist Internet and the deeply-held
27*0Sstevel@tonic-gatebeliefs of Perl's author, Larry Wall, gave rise to the free and open
28*0Sstevel@tonic-gatedistribution policy of perl.  Perl is supported by its users.  The
29*0Sstevel@tonic-gatecore, the standard Perl library, the optional modules, and the
30*0Sstevel@tonic-gatedocumentation you're reading now were all written by volunteers.  See
31*0Sstevel@tonic-gatethe personal note at the end of the README file in the perl source
32*0Sstevel@tonic-gatedistribution for more details.  See L<perlhist> (new as of 5.005)
33*0Sstevel@tonic-gatefor Perl's milestone releases.
34*0Sstevel@tonic-gate
35*0Sstevel@tonic-gateIn particular, the core development team (known as the Perl Porters)
36*0Sstevel@tonic-gateare a rag-tag band of highly altruistic individuals committed to
37*0Sstevel@tonic-gateproducing better software for free than you could hope to purchase for
38*0Sstevel@tonic-gatemoney.  You may snoop on pending developments via the archives at
39*0Sstevel@tonic-gatehttp://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/
40*0Sstevel@tonic-gateand http://archive.develooper.com/perl5-porters@perl.org/
41*0Sstevel@tonic-gateor the news gateway nntp://nntp.perl.org/perl.perl5.porters or
42*0Sstevel@tonic-gateits web interface at http://nntp.perl.org/group/perl.perl5.porters ,
43*0Sstevel@tonic-gateor read the faq at http://simon-cozens.org/writings/p5p-faq ,
44*0Sstevel@tonic-gateor you can subscribe to the mailing list by sending
45*0Sstevel@tonic-gateperl5-porters-request@perl.org a subscription request
46*0Sstevel@tonic-gate(an empty message with no subject is fine).
47*0Sstevel@tonic-gate
48*0Sstevel@tonic-gateWhile the GNU project includes Perl in its distributions, there's no
49*0Sstevel@tonic-gatesuch thing as "GNU Perl".  Perl is not produced nor maintained by the
50*0Sstevel@tonic-gateFree Software Foundation.  Perl's licensing terms are also more open
51*0Sstevel@tonic-gatethan GNU software's tend to be.
52*0Sstevel@tonic-gate
53*0Sstevel@tonic-gateYou can get commercial support of Perl if you wish, although for most
54*0Sstevel@tonic-gateusers the informal support will more than suffice.  See the answer to
55*0Sstevel@tonic-gate"Where can I buy a commercial version of perl?" for more information.
56*0Sstevel@tonic-gate
57*0Sstevel@tonic-gate=head2 Which version of Perl should I use?
58*0Sstevel@tonic-gate
59*0Sstevel@tonic-gateYou should definitely use version 5.  Version 4 is old, limited, and
60*0Sstevel@tonic-gateno longer maintained; its last patch (4.036) was in 1992, long ago and
61*0Sstevel@tonic-gatefar away.  Sure, it's stable, but so is anything that's dead; in fact,
62*0Sstevel@tonic-gateperl4 had been called a dead, flea-bitten camel carcass.  The most
63*0Sstevel@tonic-gaterecent production release is 5.8.2 (although 5.005_03 and 5.6.2 are
64*0Sstevel@tonic-gatestill supported). The most cutting-edge development release is 5.9.
65*0Sstevel@tonic-gateFurther references to the Perl language in this document refer to the
66*0Sstevel@tonic-gateproduction release unless otherwise specified.  There may be one or
67*0Sstevel@tonic-gatemore official bug fixes by the time you read this, and also perhaps
68*0Sstevel@tonic-gatesome experimental versions on the way to the next release.
69*0Sstevel@tonic-gateAll releases prior to 5.004 were subject to buffer overruns, a grave
70*0Sstevel@tonic-gatesecurity issue.
71*0Sstevel@tonic-gate
72*0Sstevel@tonic-gate=head2 What are perl4 and perl5?
73*0Sstevel@tonic-gate
74*0Sstevel@tonic-gatePerl4 and perl5 are informal names for different versions of the Perl
75*0Sstevel@tonic-gateprogramming language.  It's easier to say "perl5" than it is to say
76*0Sstevel@tonic-gate"the 5(.004) release of Perl", but some people have interpreted this
77*0Sstevel@tonic-gateto mean there's a language called "perl5", which isn't the case.
78*0Sstevel@tonic-gatePerl5 is merely the popular name for the fifth major release (October 1994),
79*0Sstevel@tonic-gatewhile perl4 was the fourth major release (March 1991).  There was also a
80*0Sstevel@tonic-gateperl1 (in January 1988), a perl2 (June 1988), and a perl3 (October 1989).
81*0Sstevel@tonic-gate
82*0Sstevel@tonic-gateThe 5.0 release is, essentially, a ground-up rewrite of the original
83*0Sstevel@tonic-gateperl source code from releases 1 through 4.  It has been modularized,
84*0Sstevel@tonic-gateobject-oriented, tweaked, trimmed, and optimized until it almost doesn't
85*0Sstevel@tonic-gatelook like the old code.  However, the interface is mostly the same, and
86*0Sstevel@tonic-gatecompatibility with previous releases is very high.
87*0Sstevel@tonic-gateSee L<perltrap/"Perl4 to Perl5 Traps">.
88*0Sstevel@tonic-gate
89*0Sstevel@tonic-gateTo avoid the "what language is perl5?" confusion, some people prefer to
90*0Sstevel@tonic-gatesimply use "perl" to refer to the latest version of perl and avoid using
91*0Sstevel@tonic-gate"perl5" altogether.  It's not really that big a deal, though.
92*0Sstevel@tonic-gate
93*0Sstevel@tonic-gateSee L<perlhist> for a history of Perl revisions.
94*0Sstevel@tonic-gate
95*0Sstevel@tonic-gate=head2 What is Ponie?
96*0Sstevel@tonic-gate
97*0Sstevel@tonic-gateAt The O'Reilly Open Source Software Convention in 2003, Artur
98*0Sstevel@tonic-gateBergman, Fotango, and The Perl Foundation announced a project to
99*0Sstevel@tonic-gaterun perl5 on the Parrot virtual machine named Ponie. Ponie stands for
100*0Sstevel@tonic-gatePerl On New Internal Engine.  The Perl 5.10 language implementation
101*0Sstevel@tonic-gatewill be used for Ponie, and there will be no language level
102*0Sstevel@tonic-gatedifferences between perl5 and ponie.  Ponie is not a complete rewrite
103*0Sstevel@tonic-gateof perl5.
104*0Sstevel@tonic-gate
105*0Sstevel@tonic-gateFor more details, see http://www.poniecode.org/
106*0Sstevel@tonic-gate
107*0Sstevel@tonic-gate=head2 What is perl6?
108*0Sstevel@tonic-gate
109*0Sstevel@tonic-gateAt The Second O'Reilly Open Source Software Convention, Larry Wall
110*0Sstevel@tonic-gateannounced Perl6 development would begin in earnest. Perl6 was an oft
111*0Sstevel@tonic-gateused term for Chip Salzenberg's project to rewrite Perl in C++ named
112*0Sstevel@tonic-gateTopaz. However, Topaz provided valuable insights to the next version
113*0Sstevel@tonic-gateof Perl and its implementation, but was ultimately abandoned.
114*0Sstevel@tonic-gate
115*0Sstevel@tonic-gateIf you want to learn more about Perl6, or have a desire to help in
116*0Sstevel@tonic-gatethe crusade to make Perl a better place then peruse the Perl6 developers
117*0Sstevel@tonic-gatepage at http://dev.perl.org/perl6/ and get involved.
118*0Sstevel@tonic-gate
119*0Sstevel@tonic-gatePerl6 is not scheduled for release yet, and Perl5 will still be supported
120*0Sstevel@tonic-gatefor quite awhile after its release. Do not wait for Perl6 to do whatever
121*0Sstevel@tonic-gateyou need to do.
122*0Sstevel@tonic-gate
123*0Sstevel@tonic-gate"We're really serious about reinventing everything that needs reinventing."
124*0Sstevel@tonic-gate--Larry Wall
125*0Sstevel@tonic-gate
126*0Sstevel@tonic-gate=head2 How stable is Perl?
127*0Sstevel@tonic-gate
128*0Sstevel@tonic-gateProduction releases, which incorporate bug fixes and new functionality,
129*0Sstevel@tonic-gateare widely tested before release.  Since the 5.000 release, we have
130*0Sstevel@tonic-gateaveraged only about one production release per year.
131*0Sstevel@tonic-gate
132*0Sstevel@tonic-gateLarry and the Perl development team occasionally make changes to the
133*0Sstevel@tonic-gateinternal core of the language, but all possible efforts are made toward
134*0Sstevel@tonic-gatebackward compatibility.  While not quite all perl4 scripts run flawlessly
135*0Sstevel@tonic-gateunder perl5, an update to perl should nearly never invalidate a program
136*0Sstevel@tonic-gatewritten for an earlier version of perl (barring accidental bug fixes
137*0Sstevel@tonic-gateand the rare new keyword).
138*0Sstevel@tonic-gate
139*0Sstevel@tonic-gate=head2 Is Perl difficult to learn?
140*0Sstevel@tonic-gate
141*0Sstevel@tonic-gateNo, Perl is easy to start learning--and easy to keep learning.  It looks
142*0Sstevel@tonic-gatelike most programming languages you're likely to have experience
143*0Sstevel@tonic-gatewith, so if you've ever written a C program, an awk script, a shell
144*0Sstevel@tonic-gatescript, or even a BASIC program, you're already partway there.
145*0Sstevel@tonic-gate
146*0Sstevel@tonic-gateMost tasks only require a small subset of the Perl language.  One of
147*0Sstevel@tonic-gatethe guiding mottos for Perl development is "there's more than one way
148*0Sstevel@tonic-gateto do it" (TMTOWTDI, sometimes pronounced "tim toady").  Perl's
149*0Sstevel@tonic-gatelearning curve is therefore shallow (easy to learn) and long (there's
150*0Sstevel@tonic-gatea whole lot you can do if you really want).
151*0Sstevel@tonic-gate
152*0Sstevel@tonic-gateFinally, because Perl is frequently (but not always, and certainly not by
153*0Sstevel@tonic-gatedefinition) an interpreted language, you can write your programs and test
154*0Sstevel@tonic-gatethem without an intermediate compilation step, allowing you to experiment
155*0Sstevel@tonic-gateand test/debug quickly and easily.  This ease of experimentation flattens
156*0Sstevel@tonic-gatethe learning curve even more.
157*0Sstevel@tonic-gate
158*0Sstevel@tonic-gateThings that make Perl easier to learn: Unix experience, almost any kind
159*0Sstevel@tonic-gateof programming experience, an understanding of regular expressions, and
160*0Sstevel@tonic-gatethe ability to understand other people's code.  If there's something you
161*0Sstevel@tonic-gateneed to do, then it's probably already been done, and a working example is
162*0Sstevel@tonic-gateusually available for free.  Don't forget the new perl modules, either.
163*0Sstevel@tonic-gateThey're discussed in Part 3 of this FAQ, along with CPAN, which is
164*0Sstevel@tonic-gatediscussed in Part 2.
165*0Sstevel@tonic-gate
166*0Sstevel@tonic-gate=head2 How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?
167*0Sstevel@tonic-gate
168*0Sstevel@tonic-gateFavorably in some areas, unfavorably in others.  Precisely which areas
169*0Sstevel@tonic-gateare good and bad is often a personal choice, so asking this question
170*0Sstevel@tonic-gateon Usenet runs a strong risk of starting an unproductive Holy War.
171*0Sstevel@tonic-gate
172*0Sstevel@tonic-gateProbably the best thing to do is try to write equivalent code to do a
173*0Sstevel@tonic-gateset of tasks.  These languages have their own newsgroups in which you
174*0Sstevel@tonic-gatecan learn about (but hopefully not argue about) them.
175*0Sstevel@tonic-gate
176*0Sstevel@tonic-gateSome comparison documents can be found at http://language.perl.com/versus/
177*0Sstevel@tonic-gateif you really can't stop yourself.
178*0Sstevel@tonic-gate
179*0Sstevel@tonic-gate=head2 Can I do [task] in Perl?
180*0Sstevel@tonic-gate
181*0Sstevel@tonic-gatePerl is flexible and extensible enough for you to use on virtually any
182*0Sstevel@tonic-gatetask, from one-line file-processing tasks to large, elaborate systems.
183*0Sstevel@tonic-gateFor many people, Perl serves as a great replacement for shell scripting.
184*0Sstevel@tonic-gateFor others, it serves as a convenient, high-level replacement for most of
185*0Sstevel@tonic-gatewhat they'd program in low-level languages like C or C++.  It's ultimately
186*0Sstevel@tonic-gateup to you (and possibly your management) which tasks you'll use Perl
187*0Sstevel@tonic-gatefor and which you won't.
188*0Sstevel@tonic-gate
189*0Sstevel@tonic-gateIf you have a library that provides an API, you can make any component
190*0Sstevel@tonic-gateof it available as just another Perl function or variable using a Perl
191*0Sstevel@tonic-gateextension written in C or C++ and dynamically linked into your main
192*0Sstevel@tonic-gateperl interpreter.  You can also go the other direction, and write your
193*0Sstevel@tonic-gatemain program in C or C++, and then link in some Perl code on the fly,
194*0Sstevel@tonic-gateto create a powerful application.  See L<perlembed>.
195*0Sstevel@tonic-gate
196*0Sstevel@tonic-gateThat said, there will always be small, focused, special-purpose
197*0Sstevel@tonic-gatelanguages dedicated to a specific problem domain that are simply more
198*0Sstevel@tonic-gateconvenient for certain kinds of problems.  Perl tries to be all things
199*0Sstevel@tonic-gateto all people, but nothing special to anyone.  Examples of specialized
200*0Sstevel@tonic-gatelanguages that come to mind include prolog and matlab.
201*0Sstevel@tonic-gate
202*0Sstevel@tonic-gate=head2 When shouldn't I program in Perl?
203*0Sstevel@tonic-gate
204*0Sstevel@tonic-gateWhen your manager forbids it--but do consider replacing them :-).
205*0Sstevel@tonic-gate
206*0Sstevel@tonic-gateActually, one good reason is when you already have an existing
207*0Sstevel@tonic-gateapplication written in another language that's all done (and done
208*0Sstevel@tonic-gatewell), or you have an application language specifically designed for a
209*0Sstevel@tonic-gatecertain task (e.g. prolog, make).
210*0Sstevel@tonic-gate
211*0Sstevel@tonic-gateFor various reasons, Perl is probably not well-suited for real-time
212*0Sstevel@tonic-gateembedded systems, low-level operating systems development work like
213*0Sstevel@tonic-gatedevice drivers or context-switching code, complex multi-threaded
214*0Sstevel@tonic-gateshared-memory applications, or extremely large applications.  You'll
215*0Sstevel@tonic-gatenotice that perl is not itself written in Perl.
216*0Sstevel@tonic-gate
217*0Sstevel@tonic-gateThe new, native-code compiler for Perl may eventually reduce the
218*0Sstevel@tonic-gatelimitations given in the previous statement to some degree, but understand
219*0Sstevel@tonic-gatethat Perl remains fundamentally a dynamically typed language, not
220*0Sstevel@tonic-gatea statically typed one.  You certainly won't be chastised if you don't
221*0Sstevel@tonic-gatetrust nuclear-plant or brain-surgery monitoring code to it.  And Larry
222*0Sstevel@tonic-gatewill sleep easier, too--Wall Street programs not withstanding. :-)
223*0Sstevel@tonic-gate
224*0Sstevel@tonic-gate=head2 What's the difference between "perl" and "Perl"?
225*0Sstevel@tonic-gate
226*0Sstevel@tonic-gateOne bit.  Oh, you weren't talking ASCII? :-) Larry now uses "Perl" to
227*0Sstevel@tonic-gatesignify the language proper and "perl" the implementation of it,
228*0Sstevel@tonic-gatei.e. the current interpreter.  Hence Tom's quip that "Nothing but perl
229*0Sstevel@tonic-gatecan parse Perl."  You may or may not choose to follow this usage.  For
230*0Sstevel@tonic-gateexample, parallelism means "awk and perl" and "Python and Perl" look
231*0Sstevel@tonic-gateOK, while "awk and Perl" and "Python and perl" do not.  But never
232*0Sstevel@tonic-gatewrite "PERL", because perl is not an acronym, apocryphal
233*0Sstevel@tonic-gatefolklore and post-facto expansions notwithstanding.
234*0Sstevel@tonic-gate
235*0Sstevel@tonic-gate=head2 Is it a Perl program or a Perl script?
236*0Sstevel@tonic-gate
237*0Sstevel@tonic-gateLarry doesn't really care.  He says (half in jest) that "a script is
238*0Sstevel@tonic-gatewhat you give the actors.  A program is what you give the audience."
239*0Sstevel@tonic-gate
240*0Sstevel@tonic-gateOriginally, a script was a canned sequence of normally interactive
241*0Sstevel@tonic-gatecommands--that is, a chat script.  Something like a UUCP or PPP chat
242*0Sstevel@tonic-gatescript or an expect script fits the bill nicely, as do configuration
243*0Sstevel@tonic-gatescripts run by a program at its start up, such F<.cshrc> or F<.ircrc>,
244*0Sstevel@tonic-gatefor example.  Chat scripts were just drivers for existing programs,
245*0Sstevel@tonic-gatenot stand-alone programs in their own right.
246*0Sstevel@tonic-gate
247*0Sstevel@tonic-gateA computer scientist will correctly explain that all programs are
248*0Sstevel@tonic-gateinterpreted and that the only question is at what level.  But if you
249*0Sstevel@tonic-gateask this question of someone who isn't a computer scientist, they might
250*0Sstevel@tonic-gatetell you that a I<program> has been compiled to physical machine code
251*0Sstevel@tonic-gateonce and can then be run multiple times, whereas a I<script> must be
252*0Sstevel@tonic-gatetranslated by a program each time it's used.
253*0Sstevel@tonic-gate
254*0Sstevel@tonic-gatePerl programs are (usually) neither strictly compiled nor strictly
255*0Sstevel@tonic-gateinterpreted.  They can be compiled to a byte-code form (something of a
256*0Sstevel@tonic-gatePerl virtual machine) or to completely different languages, like C or
257*0Sstevel@tonic-gateassembly language.  You can't tell just by looking at it whether the
258*0Sstevel@tonic-gatesource is destined for a pure interpreter, a parse-tree interpreter,
259*0Sstevel@tonic-gatea byte-code interpreter, or a native-code compiler, so it's hard to give
260*0Sstevel@tonic-gatea definitive answer here.
261*0Sstevel@tonic-gate
262*0Sstevel@tonic-gateNow that "script" and "scripting" are terms that have been seized by
263*0Sstevel@tonic-gateunscrupulous or unknowing marketeers for their own nefarious purposes,
264*0Sstevel@tonic-gatethey have begun to take on strange and often pejorative meanings,
265*0Sstevel@tonic-gatelike "non serious" or "not real programming".  Consequently, some Perl
266*0Sstevel@tonic-gateprogrammers prefer to avoid them altogether.
267*0Sstevel@tonic-gate
268*0Sstevel@tonic-gate=head2 What is a JAPH?
269*0Sstevel@tonic-gate
270*0Sstevel@tonic-gateThese are the "just another perl hacker" signatures that some people
271*0Sstevel@tonic-gatesign their postings with.  Randal Schwartz made these famous.  About
272*0Sstevel@tonic-gate100 of the earlier ones are available from
273*0Sstevel@tonic-gatehttp://www.cpan.org/misc/japh .
274*0Sstevel@tonic-gate
275*0Sstevel@tonic-gate=head2 Where can I get a list of Larry Wall witticisms?
276*0Sstevel@tonic-gate
277*0Sstevel@tonic-gateOver a hundred quips by Larry, from postings of his or source code,
278*0Sstevel@tonic-gatecan be found at http://www.cpan.org/misc/lwall-quotes.txt.gz .
279*0Sstevel@tonic-gate
280*0Sstevel@tonic-gate=head2 How can I convince my sysadmin/supervisor/employees to use version 5/5.6.1/Perl instead of some other language?
281*0Sstevel@tonic-gate
282*0Sstevel@tonic-gateIf your manager or employees are wary of unsupported software, or
283*0Sstevel@tonic-gatesoftware which doesn't officially ship with your operating system, you
284*0Sstevel@tonic-gatemight try to appeal to their self-interest.  If programmers can be
285*0Sstevel@tonic-gatemore productive using and utilizing Perl constructs, functionality,
286*0Sstevel@tonic-gatesimplicity, and power, then the typical manager/supervisor/employee
287*0Sstevel@tonic-gatemay be persuaded.  Regarding using Perl in general, it's also
288*0Sstevel@tonic-gatesometimes helpful to point out that delivery times may be reduced
289*0Sstevel@tonic-gateusing Perl compared to other languages.
290*0Sstevel@tonic-gate
291*0Sstevel@tonic-gateIf you have a project which has a bottleneck, especially in terms of
292*0Sstevel@tonic-gatetranslation or testing, Perl almost certainly will provide a viable,
293*0Sstevel@tonic-gatequick solution.  In conjunction with any persuasion effort, you
294*0Sstevel@tonic-gateshould not fail to point out that Perl is used, quite extensively, and
295*0Sstevel@tonic-gatewith extremely reliable and valuable results, at many large computer
296*0Sstevel@tonic-gatesoftware and hardware companies throughout the world.  In fact,
297*0Sstevel@tonic-gatemany Unix vendors now ship Perl by default.  Support is usually
298*0Sstevel@tonic-gatejust a news-posting away, if you can't find the answer in the
299*0Sstevel@tonic-gateI<comprehensive> documentation, including this FAQ.
300*0Sstevel@tonic-gate
301*0Sstevel@tonic-gateSee http://www.perl.org/advocacy/ for more information.
302*0Sstevel@tonic-gate
303*0Sstevel@tonic-gateIf you face reluctance to upgrading from an older version of perl,
304*0Sstevel@tonic-gatethen point out that version 4 is utterly unmaintained and unsupported
305*0Sstevel@tonic-gateby the Perl Development Team.  Another big sell for Perl5 is the large
306*0Sstevel@tonic-gatenumber of modules and extensions which greatly reduce development time
307*0Sstevel@tonic-gatefor any given task.  Also mention that the difference between version
308*0Sstevel@tonic-gate4 and version 5 of Perl is like the difference between awk and C++.
309*0Sstevel@tonic-gate(Well, OK, maybe it's not quite that distinct, but you get the idea.)
310*0Sstevel@tonic-gateIf you want support and a reasonable guarantee that what you're
311*0Sstevel@tonic-gatedeveloping will continue to work in the future, then you have to run
312*0Sstevel@tonic-gatethe supported version.  As of December 2003 that means running either
313*0Sstevel@tonic-gate5.8.2 (released in November 2003), or one of the older releases like
314*0Sstevel@tonic-gate5.6.2 (also released in November 2003; a maintenance release to let perl
315*0Sstevel@tonic-gate5.6 compile on newer systems as 5.6.1 was released in April 2001) or
316*0Sstevel@tonic-gate5.005_03 (released in March 1999),
317*0Sstevel@tonic-gatealthough 5.004_05 isn't that bad if you B<absolutely> need such an old
318*0Sstevel@tonic-gateversion (released in April 1999) for stability  reasons.
319*0Sstevel@tonic-gateAnything older than 5.004_05 shouldn't be used.
320*0Sstevel@tonic-gate
321*0Sstevel@tonic-gateOf particular note is the massive bug hunt for buffer overflow
322*0Sstevel@tonic-gateproblems that went into the 5.004 release.  All releases prior to
323*0Sstevel@tonic-gatethat, including perl4, are considered insecure and should be upgraded
324*0Sstevel@tonic-gateas soon as possible.
325*0Sstevel@tonic-gate
326*0Sstevel@tonic-gateIn August 2000 in all Linux distributions a new security problem was
327*0Sstevel@tonic-gatefound in the optional 'suidperl' (not built or installed by default)
328*0Sstevel@tonic-gatein all the Perl branches 5.6, 5.005, and 5.004, see
329*0Sstevel@tonic-gatehttp://www.cpan.org/src/5.0/sperl-2000-08-05/
330*0Sstevel@tonic-gatePerl maintenance releases 5.6.1 and 5.8.0 have this security hole closed.
331*0Sstevel@tonic-gateMost, if not all, Linux distribution have patches for this
332*0Sstevel@tonic-gatevulnerability available, see http://www.linuxsecurity.com/advisories/ ,
333*0Sstevel@tonic-gatebut the most recommendable way is to upgrade to at least Perl 5.6.1.
334*0Sstevel@tonic-gate
335*0Sstevel@tonic-gate=head1 AUTHOR AND COPYRIGHT
336*0Sstevel@tonic-gate
337*0Sstevel@tonic-gateCopyright (c) 1997, 1998, 1999, 2000, 2001 Tom Christiansen and Nathan
338*0Sstevel@tonic-gateTorkington.  All rights reserved.
339*0Sstevel@tonic-gate
340*0Sstevel@tonic-gateThis documentation is free; you can redistribute it and/or modify it
341*0Sstevel@tonic-gateunder the same terms as Perl itself.
342*0Sstevel@tonic-gate
343*0Sstevel@tonic-gateIrrespective of its distribution, all code examples here are in the public
344*0Sstevel@tonic-gatedomain.  You are permitted and encouraged to use this code and any
345*0Sstevel@tonic-gatederivatives thereof in your own programs for fun or for profit as you
346*0Sstevel@tonic-gatesee fit.  A simple comment in the code giving credit to the FAQ would
347*0Sstevel@tonic-gatebe courteous but is not required.
348