Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "PERLFAQ1 1" | |
132 | .TH PERLFAQ1 1 "2002-06-08" "perl v5.8.0" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | perlfaq1 \- General Questions About Perl ($Revision: 1.8 $, $Date: 2002/04/07 18:46:13 $) | |
135 | .SH "DESCRIPTION" | |
136 | .IX Header "DESCRIPTION" | |
137 | This section of the \s-1FAQ\s0 answers very general, high-level questions | |
138 | about Perl. | |
139 | .Sh "What is Perl?" | |
140 | .IX Subsection "What is Perl?" | |
141 | Perl is a high-level programming language with an eclectic heritage | |
142 | written by Larry Wall and a cast of thousands. It derives from the | |
143 | ubiquitous C programming language and to a lesser extent from sed, | |
144 | awk, the Unix shell, and at least a dozen other tools and languages. | |
145 | Perl's process, file, and text manipulation facilities make it | |
146 | particularly well-suited for tasks involving quick prototyping, system | |
147 | utilities, software tools, system management tasks, database access, | |
148 | graphical programming, networking, and world wide web programming. | |
149 | These strengths make it especially popular with system administrators | |
150 | and \s-1CGI\s0 script authors, but mathematicians, geneticists, journalists, | |
151 | and even managers also use Perl. Maybe you should, too. | |
152 | .Sh "Who supports Perl? Who develops it? Why is it free?" | |
153 | .IX Subsection "Who supports Perl? Who develops it? Why is it free?" | |
154 | The original culture of the pre-populist Internet and the deeply-held | |
155 | beliefs of Perl's author, Larry Wall, gave rise to the free and open | |
156 | distribution policy of perl. Perl is supported by its users. The | |
157 | core, the standard Perl library, the optional modules, and the | |
158 | documentation you're reading now were all written by volunteers. See | |
159 | the personal note at the end of the \s-1README\s0 file in the perl source | |
160 | distribution for more details. See perlhist (new as of 5.005) | |
161 | for Perl's milestone releases. | |
162 | .PP | |
163 | In particular, the core development team (known as the Perl Porters) | |
164 | are a rag-tag band of highly altruistic individuals committed to | |
165 | producing better software for free than you could hope to purchase for | |
166 | money. You may snoop on pending developments via the archives at | |
167 | http://www.xray.mpe.mpg.de/mailing\-lists/perl5\-porters/ | |
168 | and http://archive.develooper.com/perl5\-porters@perl.org/ | |
169 | or the news gateway nntp://nntp.perl.org/perl.perl5.porters or | |
170 | its web interface at http://nntp.perl.org/group/perl.perl5.porters , | |
171 | or read the faq at http://perlhacker.org/p5p\-faq , | |
172 | or you can subscribe to the mailing list by sending | |
173 | perl5\-porters\-request@perl.org a subscription request | |
174 | (an empty message with no subject is fine). | |
175 | .PP | |
176 | While the \s-1GNU\s0 project includes Perl in its distributions, there's no | |
177 | such thing as \*(L"\s-1GNU\s0 Perl\*(R". Perl is not produced nor maintained by the | |
178 | Free Software Foundation. Perl's licensing terms are also more open | |
179 | than \s-1GNU\s0 software's tend to be. | |
180 | .PP | |
181 | You can get commercial support of Perl if you wish, although for most | |
182 | users the informal support will more than suffice. See the answer to | |
183 | \&\*(L"Where can I buy a commercial version of perl?\*(R" for more information. | |
184 | .Sh "Which version of Perl should I use?" | |
185 | .IX Subsection "Which version of Perl should I use?" | |
186 | You should definitely use version 5. Version 4 is old, limited, and | |
187 | no longer maintained; its last patch (4.036) was in 1992, long ago and | |
188 | far away. Sure, it's stable, but so is anything that's dead; in fact, | |
189 | perl4 had been called a dead, flea-bitten camel carcass. The most recent | |
190 | production release is 5.6 (although 5.005_03 is still supported). | |
191 | The most cutting-edge development release is 5.7. Further references | |
192 | to the Perl language in this document refer to the production release | |
193 | unless otherwise specified. There may be one or more official bug fixes | |
194 | by the time you read this, and also perhaps some experimental versions | |
195 | on the way to the next release. All releases prior to 5.004 were subject | |
196 | to buffer overruns, a grave security issue. | |
197 | .Sh "What are perl4 and perl5?" | |
198 | .IX Subsection "What are perl4 and perl5?" | |
199 | Perl4 and perl5 are informal names for different versions of the Perl | |
200 | programming language. It's easier to say \*(L"perl5\*(R" than it is to say | |
201 | \&\*(L"the 5(.004) release of Perl\*(R", but some people have interpreted this | |
202 | to mean there's a language called \*(L"perl5\*(R", which isn't the case. | |
203 | Perl5 is merely the popular name for the fifth major release (October 1994), | |
204 | while perl4 was the fourth major release (March 1991). There was also a | |
205 | perl1 (in January 1988), a perl2 (June 1988), and a perl3 (October 1989). | |
206 | .PP | |
207 | The 5.0 release is, essentially, a ground-up rewrite of the original | |
208 | perl source code from releases 1 through 4. It has been modularized, | |
209 | object\-oriented, tweaked, trimmed, and optimized until it almost doesn't | |
210 | look like the old code. However, the interface is mostly the same, and | |
211 | compatibility with previous releases is very high. | |
212 | See \*(L"Perl4 to Perl5 Traps\*(R" in perltrap. | |
213 | .PP | |
214 | To avoid the \*(L"what language is perl5?\*(R" confusion, some people prefer to | |
215 | simply use \*(L"perl\*(R" to refer to the latest version of perl and avoid using | |
216 | \&\*(L"perl5\*(R" altogether. It's not really that big a deal, though. | |
217 | .PP | |
218 | See perlhist for a history of Perl revisions. | |
219 | .Sh "What is perl6?" | |
220 | .IX Subsection "What is perl6?" | |
221 | At The Second O'Reilly Open Source Software Convention, Larry Wall | |
222 | announced Perl6 development would begin in earnest. Perl6 was an oft | |
223 | used term for Chip Salzenberg's project to rewrite Perl in \*(C+ named | |
224 | Topaz. However, Topaz provided valuable insights to the next version | |
225 | of Perl and its implementation, but was ultimately abandoned. | |
226 | .PP | |
227 | If you want to learn more about Perl6, or have a desire to help in | |
228 | the crusade to make Perl a better place then peruse the Perl6 developers | |
229 | page at http://dev.perl.org/perl6/ and get involved. | |
230 | .PP | |
231 | Perl6 is not scheduled for release yet, and Perl5 will still be supported | |
232 | for quite awhile after its release. Do not wait for Perl6 to do whatever | |
233 | you need to do. | |
234 | .PP | |
235 | \&\*(L"We're really serious about reinventing everything that needs reinventing.\*(R" | |
236 | \&\-\-Larry Wall | |
237 | .Sh "How stable is Perl?" | |
238 | .IX Subsection "How stable is Perl?" | |
239 | Production releases, which incorporate bug fixes and new functionality, | |
240 | are widely tested before release. Since the 5.000 release, we have | |
241 | averaged only about one production release per year. | |
242 | .PP | |
243 | Larry and the Perl development team occasionally make changes to the | |
244 | internal core of the language, but all possible efforts are made toward | |
245 | backward compatibility. While not quite all perl4 scripts run flawlessly | |
246 | under perl5, an update to perl should nearly never invalidate a program | |
247 | written for an earlier version of perl (barring accidental bug fixes | |
248 | and the rare new keyword). | |
249 | .Sh "Is Perl difficult to learn?" | |
250 | .IX Subsection "Is Perl difficult to learn?" | |
251 | No, Perl is easy to start learning\*(--and easy to keep learning. It looks | |
252 | like most programming languages you're likely to have experience | |
253 | with, so if you've ever written a C program, an awk script, a shell | |
254 | script, or even a \s-1BASIC\s0 program, you're already partway there. | |
255 | .PP | |
256 | Most tasks only require a small subset of the Perl language. One of | |
257 | the guiding mottos for Perl development is \*(L"there's more than one way | |
258 | to do it\*(R" (\s-1TMTOWTDI\s0, sometimes pronounced \*(L"tim toady\*(R"). Perl's | |
259 | learning curve is therefore shallow (easy to learn) and long (there's | |
260 | a whole lot you can do if you really want). | |
261 | .PP | |
262 | Finally, because Perl is frequently (but not always, and certainly not by | |
263 | definition) an interpreted language, you can write your programs and test | |
264 | them without an intermediate compilation step, allowing you to experiment | |
265 | and test/debug quickly and easily. This ease of experimentation flattens | |
266 | the learning curve even more. | |
267 | .PP | |
268 | Things that make Perl easier to learn: Unix experience, almost any kind | |
269 | of programming experience, an understanding of regular expressions, and | |
270 | the ability to understand other people's code. If there's something you | |
271 | need to do, then it's probably already been done, and a working example is | |
272 | usually available for free. Don't forget the new perl modules, either. | |
273 | They're discussed in Part 3 of this \s-1FAQ\s0, along with \s-1CPAN\s0, which is | |
274 | discussed in Part 2. | |
275 | .Sh "How does Perl compare with other languages like Java, Python, \s-1REXX\s0, Scheme, or Tcl?" | |
276 | .IX Subsection "How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?" | |
277 | Favorably in some areas, unfavorably in others. Precisely which areas | |
278 | are good and bad is often a personal choice, so asking this question | |
279 | on Usenet runs a strong risk of starting an unproductive Holy War. | |
280 | .PP | |
281 | Probably the best thing to do is try to write equivalent code to do a | |
282 | set of tasks. These languages have their own newsgroups in which you | |
283 | can learn about (but hopefully not argue about) them. | |
284 | .PP | |
285 | Some comparison documents can be found at http://language.perl.com/versus/ | |
286 | if you really can't stop yourself. | |
287 | .Sh "Can I do [task] in Perl?" | |
288 | .IX Subsection "Can I do [task] in Perl?" | |
289 | Perl is flexible and extensible enough for you to use on virtually any | |
290 | task, from one-line file-processing tasks to large, elaborate systems. | |
291 | For many people, Perl serves as a great replacement for shell scripting. | |
292 | For others, it serves as a convenient, high-level replacement for most of | |
293 | what they'd program in low-level languages like C or \*(C+. It's ultimately | |
294 | up to you (and possibly your management) which tasks you'll use Perl | |
295 | for and which you won't. | |
296 | .PP | |
297 | If you have a library that provides an \s-1API\s0, you can make any component | |
298 | of it available as just another Perl function or variable using a Perl | |
299 | extension written in C or \*(C+ and dynamically linked into your main | |
300 | perl interpreter. You can also go the other direction, and write your | |
301 | main program in C or \*(C+, and then link in some Perl code on the fly, | |
302 | to create a powerful application. See perlembed. | |
303 | .PP | |
304 | That said, there will always be small, focused, special-purpose | |
305 | languages dedicated to a specific problem domain that are simply more | |
306 | convenient for certain kinds of problems. Perl tries to be all things | |
307 | to all people, but nothing special to anyone. Examples of specialized | |
308 | languages that come to mind include prolog and matlab. | |
309 | .Sh "When shouldn't I program in Perl?" | |
310 | .IX Subsection "When shouldn't I program in Perl?" | |
311 | When your manager forbids it\*(--but do consider replacing them :\-). | |
312 | .PP | |
313 | Actually, one good reason is when you already have an existing | |
314 | application written in another language that's all done (and done | |
315 | well), or you have an application language specifically designed for a | |
316 | certain task (e.g. prolog, make). | |
317 | .PP | |
318 | For various reasons, Perl is probably not well-suited for real-time | |
319 | embedded systems, low-level operating systems development work like | |
320 | device drivers or context-switching code, complex multi-threaded | |
321 | shared-memory applications, or extremely large applications. You'll | |
322 | notice that perl is not itself written in Perl. | |
323 | .PP | |
324 | The new, native-code compiler for Perl may eventually reduce the | |
325 | limitations given in the previous statement to some degree, but understand | |
326 | that Perl remains fundamentally a dynamically typed language, not | |
327 | a statically typed one. You certainly won't be chastised if you don't | |
328 | trust nuclear-plant or brain-surgery monitoring code to it. And Larry | |
329 | will sleep easier, too\*(--Wall Street programs not withstanding. :\-) | |
330 | .ie n .Sh "What's the difference between ""perl"" and ""Perl""?" | |
331 | .el .Sh "What's the difference between ``perl'' and ``Perl''?" | |
332 | .IX Subsection "What's the difference between perl and Perl?" | |
333 | One bit. Oh, you weren't talking \s-1ASCII\s0? :\-) Larry now uses \*(L"Perl\*(R" to | |
334 | signify the language proper and \*(L"perl\*(R" the implementation of it, | |
335 | i.e. the current interpreter. Hence Tom's quip that \*(L"Nothing but perl | |
336 | can parse Perl.\*(R" You may or may not choose to follow this usage. For | |
337 | example, parallelism means \*(L"awk and perl\*(R" and \*(L"Python and Perl\*(R" look | |
338 | \&\s-1OK\s0, while \*(L"awk and Perl\*(R" and \*(L"Python and perl\*(R" do not. But never | |
339 | write \*(L"\s-1PERL\s0\*(R", because perl is not an acronym, apocryphal | |
340 | folklore and post-facto expansions notwithstanding. | |
341 | .Sh "Is it a Perl program or a Perl script?" | |
342 | .IX Subsection "Is it a Perl program or a Perl script?" | |
343 | Larry doesn't really care. He says (half in jest) that \*(L"a script is | |
344 | what you give the actors. A program is what you give the audience.\*(R" | |
345 | .PP | |
346 | Originally, a script was a canned sequence of normally interactive | |
347 | commands\*(--that is, a chat script. Something like a \s-1UUCP\s0 or \s-1PPP\s0 chat | |
348 | script or an expect script fits the bill nicely, as do configuration | |
349 | scripts run by a program at its start up, such \fI.cshrc\fR or \fI.ircrc\fR, | |
350 | for example. Chat scripts were just drivers for existing programs, | |
351 | not stand-alone programs in their own right. | |
352 | .PP | |
353 | A computer scientist will correctly explain that all programs are | |
354 | interpreted and that the only question is at what level. But if you | |
355 | ask this question of someone who isn't a computer scientist, they might | |
356 | tell you that a \fIprogram\fR has been compiled to physical machine code | |
357 | once and can then be run multiple times, whereas a \fIscript\fR must be | |
358 | translated by a program each time it's used. | |
359 | .PP | |
360 | Perl programs are (usually) neither strictly compiled nor strictly | |
361 | interpreted. They can be compiled to a byte-code form (something of a | |
362 | Perl virtual machine) or to completely different languages, like C or | |
363 | assembly language. You can't tell just by looking at it whether the | |
364 | source is destined for a pure interpreter, a parse-tree interpreter, | |
365 | a byte-code interpreter, or a native-code compiler, so it's hard to give | |
366 | a definitive answer here. | |
367 | .PP | |
368 | Now that \*(L"script\*(R" and \*(L"scripting\*(R" are terms that have been seized by | |
369 | unscrupulous or unknowing marketeers for their own nefarious purposes, | |
370 | they have begun to take on strange and often pejorative meanings, | |
371 | like \*(L"non serious\*(R" or \*(L"not real programming\*(R". Consequently, some Perl | |
372 | programmers prefer to avoid them altogether. | |
373 | .Sh "What is a \s-1JAPH\s0?" | |
374 | .IX Subsection "What is a JAPH?" | |
375 | These are the \*(L"just another perl hacker\*(R" signatures that some people | |
376 | sign their postings with. Randal Schwartz made these famous. About | |
377 | 100 of the earlier ones are available from | |
378 | http://www.cpan.org/misc/japh . | |
379 | .Sh "Where can I get a list of Larry Wall witticisms?" | |
380 | .IX Subsection "Where can I get a list of Larry Wall witticisms?" | |
381 | Over a hundred quips by Larry, from postings of his or source code, | |
382 | can be found at http://www.cpan.org/misc/lwall\-quotes.txt.gz . | |
383 | .Sh "How can I convince my sysadmin/supervisor/employees to use version 5/5.6.1/Perl instead of some other language?" | |
384 | .IX Subsection "How can I convince my sysadmin/supervisor/employees to use version 5/5.6.1/Perl instead of some other language?" | |
385 | If your manager or employees are wary of unsupported software, or | |
386 | software which doesn't officially ship with your operating system, you | |
387 | might try to appeal to their self\-interest. If programmers can be | |
388 | more productive using and utilizing Perl constructs, functionality, | |
389 | simplicity, and power, then the typical manager/supervisor/employee | |
390 | may be persuaded. Regarding using Perl in general, it's also | |
391 | sometimes helpful to point out that delivery times may be reduced | |
392 | using Perl compared to other languages. | |
393 | .PP | |
394 | If you have a project which has a bottleneck, especially in terms of | |
395 | translation or testing, Perl almost certainly will provide a viable, | |
396 | quick solution. In conjunction with any persuasion effort, you | |
397 | should not fail to point out that Perl is used, quite extensively, and | |
398 | with extremely reliable and valuable results, at many large computer | |
399 | software and hardware companies throughout the world. In fact, | |
400 | many Unix vendors now ship Perl by default. Support is usually | |
401 | just a news-posting away, if you can't find the answer in the | |
402 | \&\fIcomprehensive\fR documentation, including this \s-1FAQ\s0. | |
403 | .PP | |
404 | See http://www.perl.org/advocacy/ for more information. | |
405 | .PP | |
406 | If you face reluctance to upgrading from an older version of perl, | |
407 | then point out that version 4 is utterly unmaintained and unsupported | |
408 | by the Perl Development Team. Another big sell for Perl5 is the large | |
409 | number of modules and extensions which greatly reduce development time | |
410 | for any given task. Also mention that the difference between version | |
411 | 4 and version 5 of Perl is like the difference between awk and \*(C+. | |
412 | (Well, \s-1OK\s0, maybe it's not quite that distinct, but you get the idea.) | |
413 | If you want support and a reasonable guarantee that what you're | |
414 | developing will continue to work in the future, then you have to run | |
415 | the supported version. As of January 2002 that probably means | |
416 | running either of the releases 5.6.1 (released in April 2001) or | |
417 | 5.005_03 (released in March 1999), although 5.004_05 isn't that bad | |
418 | if you \fBabsolutely\fR need such an old version (released in April 1999) | |
419 | for stability reasons. Anything older than 5.004_05 shouldn't be used. | |
420 | .PP | |
421 | Of particular note is the massive bug hunt for buffer overflow | |
422 | problems that went into the 5.004 release. All releases prior to | |
423 | that, including perl4, are considered insecure and should be upgraded | |
424 | as soon as possible. | |
425 | .PP | |
426 | In August 2000 in all Linux distributions a new security problem was | |
427 | found in the optional 'suidperl' (not built or installed by default) | |
428 | in all the Perl branches 5.6, 5.005, and 5.004, see | |
429 | http://www.cpan.org/src/5.0/sperl\-2000\-08\-05/ | |
430 | Perl maintenance releases 5.6.1 and 5.8.0 have this security hole closed. | |
431 | Most, if not all, Linux distribution have patches for this | |
432 | vulnerability available, see http://www.linuxsecurity.com/advisories/ , | |
433 | but the most recommendable way is to upgrade to at least Perl 5.6.1. | |
434 | .SH "AUTHOR AND COPYRIGHT" | |
435 | .IX Header "AUTHOR AND COPYRIGHT" | |
436 | Copyright (c) 1997, 1998, 1999, 2000, 2001 Tom Christiansen and Nathan | |
437 | Torkington. All rights reserved. | |
438 | .PP | |
439 | This documentation is free; you can redistribute it and/or modify it | |
440 | under the same terms as Perl itself. | |
441 | .PP | |
442 | Irrespective of its distribution, all code examples here are in the public | |
443 | domain. You are permitted and encouraged to use this code and any | |
444 | derivatives thereof in your own programs for fun or for profit as you | |
445 | see fit. A simple comment in the code giving credit to the \s-1FAQ\s0 would | |
446 | be courteous but is not required. |