| 1 | .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 |
| 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 "PERL 1" |
| 132 | .TH PERL 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide" |
| 133 | .SH "NAME" |
| 134 | perl \- Practical Extraction and Report Language |
| 135 | .SH "SYNOPSIS" |
| 136 | .IX Header "SYNOPSIS" |
| 137 | \&\fBperl\fR [\ \fB\-sTtuUWX\fR\ ] |
| 138 | [\ \fB\-hv\fR\ ]\ [\ \fB\-V\fR[:\fIconfigvar\fR]\ ] |
| 139 | [\ \fB\-cw\fR\ ]\ [\ \fB\-d\fR[\fBt\fR][:\fIdebugger\fR]\ ]\ [\ \fB\-D\fR[\fInumber/list\fR]\ ] |
| 140 | [\ \fB\-pna\fR\ ]\ [\ \fB\-F\fR\fIpattern\fR\ ]\ [\ \fB\-l\fR[\fIoctal\fR]\ ]\ [\ \fB\-0\fR[\fIoctal/hexadecimal\fR]\ ] |
| 141 | [\ \fB\-I\fR\fIdir\fR\ ]\ [\ \fB\-m\fR[\fB\-\fR]\fImodule\fR\ ]\ [\ \fB\-M\fR[\fB\-\fR]\fI'module...'\fR\ ]\ [\ \fB\-f\fR\ ] |
| 142 | [\ \fB\-C\ [\f(BInumber/list\fB]\ \fR] |
| 143 | [\ \fB\-P\fR\ ] |
| 144 | [\ \fB\-S\fR\ ] |
| 145 | [\ \fB\-x\fR[\fIdir\fR]\ ] |
| 146 | [\ \fB\-i\fR[\fIextension\fR]\ ] |
| 147 | [\ \fB\-e\fR\ \fI'command'\fR\ ]\ [\ \fB\-\-\fR\ ]\ [\ \fIprogramfile\fR\ ]\ [\ \fIargument\fR\ ]... |
| 148 | .PP |
| 149 | If you're new to Perl, you should start with perlintro, which is a |
| 150 | general intro for beginners and provides some background to help you |
| 151 | navigate the rest of Perl's extensive documentation. |
| 152 | .PP |
| 153 | For ease of access, the Perl manual has been split up into several sections. |
| 154 | .Sh "Overview" |
| 155 | .IX Subsection "Overview" |
| 156 | .Vb 3 |
| 157 | \& perl Perl overview (this section) |
| 158 | \& perlintro Perl introduction for beginners |
| 159 | \& perltoc Perl documentation table of contents |
| 160 | .Ve |
| 161 | .Sh "Tutorials" |
| 162 | .IX Subsection "Tutorials" |
| 163 | .Vb 3 |
| 164 | \& perlreftut Perl references short introduction |
| 165 | \& perldsc Perl data structures intro |
| 166 | \& perllol Perl data structures: arrays of arrays |
| 167 | .Ve |
| 168 | .PP |
| 169 | .Vb 2 |
| 170 | \& perlrequick Perl regular expressions quick start |
| 171 | \& perlretut Perl regular expressions tutorial |
| 172 | .Ve |
| 173 | .PP |
| 174 | .Vb 4 |
| 175 | \& perlboot Perl OO tutorial for beginners |
| 176 | \& perltoot Perl OO tutorial, part 1 |
| 177 | \& perltooc Perl OO tutorial, part 2 |
| 178 | \& perlbot Perl OO tricks and examples |
| 179 | .Ve |
| 180 | .PP |
| 181 | .Vb 1 |
| 182 | \& perlstyle Perl style guide |
| 183 | .Ve |
| 184 | .PP |
| 185 | .Vb 3 |
| 186 | \& perlcheat Perl cheat sheet |
| 187 | \& perltrap Perl traps for the unwary |
| 188 | \& perldebtut Perl debugging tutorial |
| 189 | .Ve |
| 190 | .PP |
| 191 | .Vb 10 |
| 192 | \& perlfaq Perl frequently asked questions |
| 193 | \& perlfaq1 General Questions About Perl |
| 194 | \& perlfaq2 Obtaining and Learning about Perl |
| 195 | \& perlfaq3 Programming Tools |
| 196 | \& perlfaq4 Data Manipulation |
| 197 | \& perlfaq5 Files and Formats |
| 198 | \& perlfaq6 Regexes |
| 199 | \& perlfaq7 Perl Language Issues |
| 200 | \& perlfaq8 System Interaction |
| 201 | \& perlfaq9 Networking |
| 202 | .Ve |
| 203 | .Sh "Reference Manual" |
| 204 | .IX Subsection "Reference Manual" |
| 205 | .Vb 21 |
| 206 | \& perlsyn Perl syntax |
| 207 | \& perldata Perl data structures |
| 208 | \& perlop Perl operators and precedence |
| 209 | \& perlsub Perl subroutines |
| 210 | \& perlfunc Perl built-in functions |
| 211 | \& perlopentut Perl open() tutorial |
| 212 | \& perlpacktut Perl pack() and unpack() tutorial |
| 213 | \& perlpod Perl plain old documentation |
| 214 | \& perlpodspec Perl plain old documentation format specification |
| 215 | \& perlrun Perl execution and options |
| 216 | \& perldiag Perl diagnostic messages |
| 217 | \& perllexwarn Perl warnings and their control |
| 218 | \& perldebug Perl debugging |
| 219 | \& perlvar Perl predefined variables |
| 220 | \& perlre Perl regular expressions, the rest of the story |
| 221 | \& perlreref Perl regular expressions quick reference |
| 222 | \& perlref Perl references, the rest of the story |
| 223 | \& perlform Perl formats |
| 224 | \& perlobj Perl objects |
| 225 | \& perltie Perl objects hidden behind simple variables |
| 226 | \& perldbmfilter Perl DBM filters |
| 227 | .Ve |
| 228 | .PP |
| 229 | .Vb 3 |
| 230 | \& perlipc Perl interprocess communication |
| 231 | \& perlfork Perl fork() information |
| 232 | \& perlnumber Perl number semantics |
| 233 | .Ve |
| 234 | .PP |
| 235 | .Vb 2 |
| 236 | \& perlthrtut Perl threads tutorial |
| 237 | \& perlothrtut Old Perl threads tutorial |
| 238 | .Ve |
| 239 | .PP |
| 240 | .Vb 5 |
| 241 | \& perlport Perl portability guide |
| 242 | \& perllocale Perl locale support |
| 243 | \& perluniintro Perl Unicode introduction |
| 244 | \& perlunicode Perl Unicode support |
| 245 | \& perlebcdic Considerations for running Perl on EBCDIC platforms |
| 246 | .Ve |
| 247 | .PP |
| 248 | .Vb 1 |
| 249 | \& perlsec Perl security |
| 250 | .Ve |
| 251 | .PP |
| 252 | .Vb 5 |
| 253 | \& perlmod Perl modules: how they work |
| 254 | \& perlmodlib Perl modules: how to write and use |
| 255 | \& perlmodstyle Perl modules: how to write modules with style |
| 256 | \& perlmodinstall Perl modules: how to install from CPAN |
| 257 | \& perlnewmod Perl modules: preparing a new module for distribution |
| 258 | .Ve |
| 259 | .PP |
| 260 | .Vb 1 |
| 261 | \& perlutil utilities packaged with the Perl distribution |
| 262 | .Ve |
| 263 | .PP |
| 264 | .Vb 1 |
| 265 | \& perlcompile Perl compiler suite intro |
| 266 | .Ve |
| 267 | .PP |
| 268 | .Vb 1 |
| 269 | \& perlfilter Perl source filters |
| 270 | .Ve |
| 271 | .PP |
| 272 | .Vb 1 |
| 273 | \& perlglossary Perl Glossary |
| 274 | .Ve |
| 275 | .Sh "Internals and C Language Interface" |
| 276 | .IX Subsection "Internals and C Language Interface" |
| 277 | .Vb 7 |
| 278 | \& perlembed Perl ways to embed perl in your C or C++ application |
| 279 | \& perldebguts Perl debugging guts and tips |
| 280 | \& perlxstut Perl XS tutorial |
| 281 | \& perlxs Perl XS application programming interface |
| 282 | \& perlclib Internal replacements for standard C library functions |
| 283 | \& perlguts Perl internal functions for those doing extensions |
| 284 | \& perlcall Perl calling conventions from C |
| 285 | .Ve |
| 286 | .PP |
| 287 | .Vb 4 |
| 288 | \& perlapi Perl API listing (autogenerated) |
| 289 | \& perlintern Perl internal functions (autogenerated) |
| 290 | \& perliol C API for Perl's implementation of IO in Layers |
| 291 | \& perlapio Perl internal IO abstraction interface |
| 292 | .Ve |
| 293 | .PP |
| 294 | .Vb 1 |
| 295 | \& perlhack Perl hackers guide |
| 296 | .Ve |
| 297 | .Sh "Miscellaneous" |
| 298 | .IX Subsection "Miscellaneous" |
| 299 | .Vb 2 |
| 300 | \& perlbook Perl book information |
| 301 | \& perltodo Perl things to do |
| 302 | .Ve |
| 303 | .PP |
| 304 | .Vb 1 |
| 305 | \& perldoc Look up Perl documentation in Pod format |
| 306 | .Ve |
| 307 | .PP |
| 308 | .Vb 18 |
| 309 | \& perlhist Perl history records |
| 310 | \& perldelta Perl changes since previous version |
| 311 | \& perl587delta Perl changes in version 5.8.7 |
| 312 | \& perl586delta Perl changes in version 5.8.6 |
| 313 | \& perl585delta Perl changes in version 5.8.5 |
| 314 | \& perl584delta Perl changes in version 5.8.4 |
| 315 | \& perl583delta Perl changes in version 5.8.3 |
| 316 | \& perl582delta Perl changes in version 5.8.2 |
| 317 | \& perl581delta Perl changes in version 5.8.1 |
| 318 | \& perl58delta Perl changes in version 5.8.0 |
| 319 | \& perl573delta Perl changes in version 5.7.3 |
| 320 | \& perl572delta Perl changes in version 5.7.2 |
| 321 | \& perl571delta Perl changes in version 5.7.1 |
| 322 | \& perl570delta Perl changes in version 5.7.0 |
| 323 | \& perl561delta Perl changes in version 5.6.1 |
| 324 | \& perl56delta Perl changes in version 5.6 |
| 325 | \& perl5005delta Perl changes in version 5.005 |
| 326 | \& perl5004delta Perl changes in version 5.004 |
| 327 | .Ve |
| 328 | .PP |
| 329 | .Vb 2 |
| 330 | \& perlartistic Perl Artistic License |
| 331 | \& perlgpl GNU General Public License |
| 332 | .Ve |
| 333 | .Sh "Language-Specific" |
| 334 | .IX Subsection "Language-Specific" |
| 335 | .Vb 4 |
| 336 | \& perlcn Perl for Simplified Chinese (in EUC-CN) |
| 337 | \& perljp Perl for Japanese (in EUC-JP) |
| 338 | \& perlko Perl for Korean (in EUC-KR) |
| 339 | \& perltw Perl for Traditional Chinese (in Big5) |
| 340 | .Ve |
| 341 | .Sh "Platform-Specific" |
| 342 | .IX Subsection "Platform-Specific" |
| 343 | .Vb 34 |
| 344 | \& perlaix Perl notes for AIX |
| 345 | \& perlamiga Perl notes for AmigaOS |
| 346 | \& perlapollo Perl notes for Apollo DomainOS |
| 347 | \& perlbeos Perl notes for BeOS |
| 348 | \& perlbs2000 Perl notes for POSIX-BC BS2000 |
| 349 | \& perlce Perl notes for WinCE |
| 350 | \& perlcygwin Perl notes for Cygwin |
| 351 | \& perldgux Perl notes for DG/UX |
| 352 | \& perldos Perl notes for DOS |
| 353 | \& perlepoc Perl notes for EPOC |
| 354 | \& perlfreebsd Perl notes for FreeBSD |
| 355 | \& perlhpux Perl notes for HP-UX |
| 356 | \& perlhurd Perl notes for Hurd |
| 357 | \& perlirix Perl notes for Irix |
| 358 | \& perllinux Perl notes for Linux |
| 359 | \& perlmachten Perl notes for Power MachTen |
| 360 | \& perlmacos Perl notes for Mac OS (Classic) |
| 361 | \& perlmacosx Perl notes for Mac OS X |
| 362 | \& perlmint Perl notes for MiNT |
| 363 | \& perlmpeix Perl notes for MPE/iX |
| 364 | \& perlnetware Perl notes for NetWare |
| 365 | \& perlopenbsd Perl notes for OpenBSD |
| 366 | \& perlos2 Perl notes for OS/2 |
| 367 | \& perlos390 Perl notes for OS/390 |
| 368 | \& perlos400 Perl notes for OS/400 |
| 369 | \& perlplan9 Perl notes for Plan 9 |
| 370 | \& perlqnx Perl notes for QNX |
| 371 | \& perlsolaris Perl notes for Solaris |
| 372 | \& perltru64 Perl notes for Tru64 |
| 373 | \& perluts Perl notes for UTS |
| 374 | \& perlvmesa Perl notes for VM/ESA |
| 375 | \& perlvms Perl notes for VMS |
| 376 | \& perlvos Perl notes for Stratus VOS |
| 377 | \& perlwin32 Perl notes for Windows |
| 378 | .Ve |
| 379 | .PP |
| 380 | By default, the manpages listed above are installed in the |
| 381 | \&\fI/usr/local/man/\fR directory. |
| 382 | .PP |
| 383 | Extensive additional documentation for Perl modules is available. The |
| 384 | default configuration for perl will place this additional documentation |
| 385 | in the \fI/usr/local/lib/perl5/man\fR directory (or else in the \fIman\fR |
| 386 | subdirectory of the Perl library directory). Some of this additional |
| 387 | documentation is distributed standard with Perl, but you'll also find |
| 388 | documentation for third-party modules there. |
| 389 | .PP |
| 390 | You should be able to view Perl's documentation with your \fIman\fR\|(1) |
| 391 | program by including the proper directories in the appropriate start-up |
| 392 | files, or in the \s-1MANPATH\s0 environment variable. To find out where the |
| 393 | configuration has installed the manpages, type: |
| 394 | .PP |
| 395 | .Vb 1 |
| 396 | \& perl -V:man.dir |
| 397 | .Ve |
| 398 | .PP |
| 399 | If the directories have a common stem, such as \fI/usr/local/man/man1\fR |
| 400 | and \fI/usr/local/man/man3\fR, you need only to add that stem |
| 401 | (\fI/usr/local/man\fR) to your \fIman\fR\|(1) configuration files or your \s-1MANPATH\s0 |
| 402 | environment variable. If they do not share a stem, you'll have to add |
| 403 | both stems. |
| 404 | .PP |
| 405 | If that doesn't work for some reason, you can still use the |
| 406 | supplied \fIperldoc\fR script to view module information. You might |
| 407 | also look into getting a replacement man program. |
| 408 | .PP |
| 409 | If something strange has gone wrong with your program and you're not |
| 410 | sure where you should look for help, try the \fB\-w\fR switch first. It |
| 411 | will often point out exactly where the trouble is. |
| 412 | .SH "DESCRIPTION" |
| 413 | .IX Header "DESCRIPTION" |
| 414 | Perl is a language optimized for scanning arbitrary |
| 415 | text files, extracting information from those text files, and printing |
| 416 | reports based on that information. It's also a good language for many |
| 417 | system management tasks. The language is intended to be practical |
| 418 | (easy to use, efficient, complete) rather than beautiful (tiny, |
| 419 | elegant, minimal). |
| 420 | .PP |
| 421 | Perl combines (in the author's opinion, anyway) some of the best |
| 422 | features of C, \fBsed\fR, \fBawk\fR, and \fBsh\fR, so people familiar with |
| 423 | those languages should have little difficulty with it. (Language |
| 424 | historians will also note some vestiges of \fBcsh\fR, Pascal, and even |
| 425 | \&\s-1BASIC\-PLUS\s0.) Expression syntax corresponds closely to C |
| 426 | expression syntax. Unlike most Unix utilities, Perl does not |
| 427 | arbitrarily limit the size of your data\*(--if you've got the memory, |
| 428 | Perl can slurp in your whole file as a single string. Recursion is of |
| 429 | unlimited depth. And the tables used by hashes (sometimes called |
| 430 | \&\*(L"associative arrays\*(R") grow as necessary to prevent degraded |
| 431 | performance. Perl can use sophisticated pattern matching techniques to |
| 432 | scan large amounts of data quickly. Although optimized for |
| 433 | scanning text, Perl can also deal with binary data, and can make dbm |
| 434 | files look like hashes. Setuid Perl scripts are safer than C programs |
| 435 | through a dataflow tracing mechanism that prevents many stupid |
| 436 | security holes. |
| 437 | .PP |
| 438 | If you have a problem that would ordinarily use \fBsed\fR or \fBawk\fR or |
| 439 | \&\fBsh\fR, but it exceeds their capabilities or must run a little faster, |
| 440 | and you don't want to write the silly thing in C, then Perl may be for |
| 441 | you. There are also translators to turn your \fBsed\fR and \fBawk\fR |
| 442 | scripts into Perl scripts. |
| 443 | .PP |
| 444 | But wait, there's more... |
| 445 | .PP |
| 446 | Begun in 1993 (see perlhist), Perl version 5 is nearly a complete |
| 447 | rewrite that provides the following additional benefits: |
| 448 | .IP "\(bu" 4 |
| 449 | modularity and reusability using innumerable modules |
| 450 | .Sp |
| 451 | Described in perlmod, perlmodlib, and perlmodinstall. |
| 452 | .IP "\(bu" 4 |
| 453 | embeddable and extensible |
| 454 | .Sp |
| 455 | Described in perlembed, perlxstut, perlxs, perlcall, |
| 456 | perlguts, and xsubpp. |
| 457 | .IP "\(bu" 4 |
| 458 | roll-your-own magic variables (including multiple simultaneous \s-1DBM\s0 |
| 459 | implementations) |
| 460 | .Sp |
| 461 | Described in perltie and AnyDBM_File. |
| 462 | .IP "\(bu" 4 |
| 463 | subroutines can now be overridden, autoloaded, and prototyped |
| 464 | .Sp |
| 465 | Described in perlsub. |
| 466 | .IP "\(bu" 4 |
| 467 | arbitrarily nested data structures and anonymous functions |
| 468 | .Sp |
| 469 | Described in perlreftut, perlref, perldsc, and perllol. |
| 470 | .IP "\(bu" 4 |
| 471 | object-oriented programming |
| 472 | .Sp |
| 473 | Described in perlobj, perlboot, perltoot, perltooc, |
| 474 | and perlbot. |
| 475 | .IP "\(bu" 4 |
| 476 | support for light-weight processes (threads) |
| 477 | .Sp |
| 478 | Described in perlthrtut and threads. |
| 479 | .IP "\(bu" 4 |
| 480 | support for Unicode, internationalization, and localization |
| 481 | .Sp |
| 482 | Described in perluniintro, perllocale and Locale::Maketext. |
| 483 | .IP "\(bu" 4 |
| 484 | lexical scoping |
| 485 | .Sp |
| 486 | Described in perlsub. |
| 487 | .IP "\(bu" 4 |
| 488 | regular expression enhancements |
| 489 | .Sp |
| 490 | Described in perlre, with additional examples in perlop. |
| 491 | .IP "\(bu" 4 |
| 492 | enhanced debugger and interactive Perl environment, |
| 493 | with integrated editor support |
| 494 | .Sp |
| 495 | Described in perldebtut, perldebug and perldebguts. |
| 496 | .IP "\(bu" 4 |
| 497 | \&\s-1POSIX\s0 1003.1 compliant library |
| 498 | .Sp |
| 499 | Described in \s-1POSIX\s0. |
| 500 | .PP |
| 501 | Okay, that's \fIdefinitely\fR enough hype. |
| 502 | .SH "AVAILABILITY" |
| 503 | .IX Header "AVAILABILITY" |
| 504 | Perl is available for most operating systems, including virtually |
| 505 | all Unix-like platforms. See \*(L"Supported Platforms\*(R" in perlport |
| 506 | for a listing. |
| 507 | .SH "ENVIRONMENT" |
| 508 | .IX Header "ENVIRONMENT" |
| 509 | See perlrun. |
| 510 | .SH "AUTHOR" |
| 511 | .IX Header "AUTHOR" |
| 512 | Larry Wall <larry@wall.org>, with the help of oodles of other folks. |
| 513 | .PP |
| 514 | If your Perl success stories and testimonials may be of help to others |
| 515 | who wish to advocate the use of Perl in their applications, |
| 516 | or if you wish to simply express your gratitude to Larry and the |
| 517 | Perl developers, please write to perl\-thanks@perl.org . |
| 518 | .SH "FILES" |
| 519 | .IX Header "FILES" |
| 520 | .Vb 1 |
| 521 | \& "@INC" locations of perl libraries |
| 522 | .Ve |
| 523 | .SH "SEE ALSO" |
| 524 | .IX Header "SEE ALSO" |
| 525 | .Vb 2 |
| 526 | \& a2p awk to perl translator |
| 527 | \& s2p sed to perl translator |
| 528 | .Ve |
| 529 | .PP |
| 530 | .Vb 4 |
| 531 | \& http://www.perl.org/ the Perl homepage |
| 532 | \& http://www.perl.com/ Perl articles (O'Reilly) |
| 533 | \& http://www.cpan.org/ the Comprehensive Perl Archive |
| 534 | \& http://www.pm.org/ the Perl Mongers |
| 535 | .Ve |
| 536 | .SH "DIAGNOSTICS" |
| 537 | .IX Header "DIAGNOSTICS" |
| 538 | The \f(CW\*(C`use warnings\*(C'\fR pragma (and the \fB\-w\fR switch) produces some |
| 539 | lovely diagnostics. |
| 540 | .PP |
| 541 | See perldiag for explanations of all Perl's diagnostics. The \f(CW\*(C`use |
| 542 | diagnostics\*(C'\fR pragma automatically turns Perl's normally terse warnings |
| 543 | and errors into these longer forms. |
| 544 | .PP |
| 545 | Compilation errors will tell you the line number of the error, with an |
| 546 | indication of the next token or token type that was to be examined. |
| 547 | (In a script passed to Perl via \fB\-e\fR switches, each |
| 548 | \&\fB\-e\fR is counted as one line.) |
| 549 | .PP |
| 550 | Setuid scripts have additional constraints that can produce error |
| 551 | messages such as \*(L"Insecure dependency\*(R". See perlsec. |
| 552 | .PP |
| 553 | Did we mention that you should definitely consider using the \fB\-w\fR |
| 554 | switch? |
| 555 | .SH "BUGS" |
| 556 | .IX Header "BUGS" |
| 557 | The \fB\-w\fR switch is not mandatory. |
| 558 | .PP |
| 559 | Perl is at the mercy of your machine's definitions of various |
| 560 | operations such as type casting, \fIatof()\fR, and floating-point |
| 561 | output with \fIsprintf()\fR. |
| 562 | .PP |
| 563 | If your stdio requires a seek or eof between reads and writes on a |
| 564 | particular stream, so does Perl. (This doesn't apply to \fIsysread()\fR |
| 565 | and \fIsyswrite()\fR.) |
| 566 | .PP |
| 567 | While none of the built-in data types have any arbitrary size limits |
| 568 | (apart from memory size), there are still a few arbitrary limits: a |
| 569 | given variable name may not be longer than 251 characters. Line numbers |
| 570 | displayed by diagnostics are internally stored as short integers, |
| 571 | so they are limited to a maximum of 65535 (higher numbers usually being |
| 572 | affected by wraparound). |
| 573 | .PP |
| 574 | You may mail your bug reports (be sure to include full configuration |
| 575 | information as output by the myconfig program in the perl source |
| 576 | tree, or by \f(CW\*(C`perl \-V\*(C'\fR) to perlbug@perl.org . If you've succeeded |
| 577 | in compiling perl, the \fBperlbug\fR script in the \fIutils/\fR subdirectory |
| 578 | can be used to help mail in a bug report. |
| 579 | .PP |
| 580 | Perl actually stands for Pathologically Eclectic Rubbish Lister, but |
| 581 | don't tell anyone I said that. |
| 582 | .SH "NOTES" |
| 583 | .IX Header "NOTES" |
| 584 | The Perl motto is \*(L"There's more than one way to do it.\*(R" Divining |
| 585 | how many more is left as an exercise to the reader. |
| 586 | .PP |
| 587 | The three principal virtues of a programmer are Laziness, |
| 588 | Impatience, and Hubris. See the Camel Book for why. |