📄 perl.1
字号:
\& perlhist Perl history records\& perldelta Perl changes since previous version\& perl595delta Perl changes in version 5.9.5\& perl594delta Perl changes in version 5.9.4\& perl593delta Perl changes in version 5.9.3\& perl592delta Perl changes in version 5.9.2\& perl591delta Perl changes in version 5.9.1\& perl590delta Perl changes in version 5.9.0\& perl588delta Perl changes in version 5.8.8\& perl587delta Perl changes in version 5.8.7\& perl586delta Perl changes in version 5.8.6\& perl585delta Perl changes in version 5.8.5\& perl584delta Perl changes in version 5.8.4\& perl583delta Perl changes in version 5.8.3\& perl582delta Perl changes in version 5.8.2\& perl581delta Perl changes in version 5.8.1\& perl58delta Perl changes in version 5.8.0\& perl573delta Perl changes in version 5.7.3\& perl572delta Perl changes in version 5.7.2\& perl571delta Perl changes in version 5.7.1\& perl570delta Perl changes in version 5.7.0\& perl561delta Perl changes in version 5.6.1\& perl56delta Perl changes in version 5.6\& perl5005delta Perl changes in version 5.005\& perl5004delta Perl changes in version 5.004\&\& perlartistic Perl Artistic License\& perlgpl GNU General Public License.Ve.Sh "Language-Specific".IX Subsection "Language-Specific".Vb 4\& perlcn Perl for Simplified Chinese (in EUC\-CN)\& perljp Perl for Japanese (in EUC\-JP)\& perlko Perl for Korean (in EUC\-KR)\& perltw Perl for Traditional Chinese (in Big5).Ve.Sh "Platform-Specific".IX Subsection "Platform-Specific".Vb 10\& perlaix Perl notes for AIX\& perlamiga Perl notes for AmigaOS\& perlapollo Perl notes for Apollo DomainOS\& perlbeos Perl notes for BeOS\& perlbs2000 Perl notes for POSIX\-BC BS2000\& perlce Perl notes for WinCE\& perlcygwin Perl notes for Cygwin\& perldgux Perl notes for DG/UX\& perldos Perl notes for DOS\& perlepoc Perl notes for EPOC\& perlfreebsd Perl notes for FreeBSD\& perlhpux Perl notes for HP\-UX\& perlhurd Perl notes for Hurd\& perlirix Perl notes for Irix\& perllinux Perl notes for Linux\& perlmachten Perl notes for Power MachTen\& perlmacos Perl notes for Mac OS (Classic)\& perlmacosx Perl notes for Mac OS X\& perlmint Perl notes for MiNT\& perlmpeix Perl notes for MPE/iX\& perlnetware Perl notes for NetWare\& perlopenbsd Perl notes for OpenBSD\& perlos2 Perl notes for OS/2\& perlos390 Perl notes for OS/390\& perlos400 Perl notes for OS/400\& perlplan9 Perl notes for Plan 9\& perlqnx Perl notes for QNX\& perlriscos Perl notes for RISC OS\& perlsolaris Perl notes for Solaris\& perlsymbian Perl notes for Symbian\& perltru64 Perl notes for Tru64\& perluts Perl notes for UTS\& perlvmesa Perl notes for VM/ESA\& perlvms Perl notes for VMS\& perlvos Perl notes for Stratus VOS\& perlwin32 Perl notes for Windows.Ve.PPBy default, the manpages listed above are installed in the \&\fI/usr/local/man/\fR directory..PPExtensive additional documentation for Perl modules is available. Thedefault configuration for perl will place this additional documentationin the \fI/usr/local/lib/perl5/man\fR directory (or else in the \fIman\fRsubdirectory of the Perl library directory). Some of this additionaldocumentation is distributed standard with Perl, but you'll also finddocumentation for third-party modules there..PPYou should be able to view Perl's documentation with your \fIman\fR\|(1)program by including the proper directories in the appropriate start-upfiles, or in the \s-1MANPATH\s0 environment variable. To find out where theconfiguration has installed the manpages, type:.PP.Vb 1\& perl \-V:man.dir.Ve.PPIf the directories have a common stem, such as \fI/usr/local/man/man1\fRand \fI/usr/local/man/man3\fR, you need only to add that stem(\fI/usr/local/man\fR) to your \fIman\fR\|(1) configuration files or your \s-1MANPATH\s0environment variable. If they do not share a stem, you'll have to addboth stems..PPIf that doesn't work for some reason, you can still use thesupplied \fIperldoc\fR script to view module information. You mightalso look into getting a replacement man program..PPIf something strange has gone wrong with your program and you're notsure where you should look for help, try the \fB\-w\fR switch first. Itwill often point out exactly where the trouble is..SH "DESCRIPTION".IX Header "DESCRIPTION"Perl is a language optimized for scanning arbitrarytext files, extracting information from those text files, and printingreports based on that information. It's also a good language for manysystem management tasks. The language is intended to be practical(easy to use, efficient, complete) rather than beautiful (tiny,elegant, minimal)..PPPerl combines (in the author's opinion, anyway) some of the bestfeatures of C, \fBsed\fR, \fBawk\fR, and \fBsh\fR, so people familiar withthose languages should have little difficulty with it. (Languagehistorians will also note some vestiges of \fBcsh\fR, Pascal, and evenBASIC-PLUS.) Expression syntax corresponds closely to Cexpression syntax. Unlike most Unix utilities, Perl does notarbitrarily limit the size of your data\*(--if you've got the memory,Perl can slurp in your whole file as a single string. Recursion is ofunlimited depth. And the tables used by hashes (sometimes called\&\*(L"associative arrays\*(R") grow as necessary to prevent degradedperformance. Perl can use sophisticated pattern matching techniques toscan large amounts of data quickly. Although optimized forscanning text, Perl can also deal with binary data, and can make dbmfiles look like hashes. Setuid Perl scripts are safer than C programsthrough a dataflow tracing mechanism that prevents many stupidsecurity holes..PPIf you have a problem that would ordinarily use \fBsed\fR or \fBawk\fR or\&\fBsh\fR, but it exceeds their capabilities or must run a little faster,and you don't want to write the silly thing in C, then Perl may be foryou. There are also translators to turn your \fBsed\fR and \fBawk\fRscripts into Perl scripts..PPBut wait, there's more....PPBegun in 1993 (see perlhist), Perl version 5 is nearly a completerewrite that provides the following additional benefits:.IP "\(bu" 4modularity and reusability using innumerable modules.SpDescribed in perlmod, perlmodlib, and perlmodinstall..IP "\(bu" 4embeddable and extensible.SpDescribed in perlembed, perlxstut, perlxs, perlcall,perlguts, and xsubpp..IP "\(bu" 4roll-your-own magic variables (including multiple simultaneous \s-1DBM\s0implementations).SpDescribed in perltie and AnyDBM_File..IP "\(bu" 4subroutines can now be overridden, autoloaded, and prototyped.SpDescribed in perlsub..IP "\(bu" 4arbitrarily nested data structures and anonymous functions.SpDescribed in perlreftut, perlref, perldsc, and perllol..IP "\(bu" 4object-oriented programming.SpDescribed in perlobj, perlboot, perltoot, perltooc,and perlbot..IP "\(bu" 4support for light-weight processes (threads).SpDescribed in perlthrtut and threads..IP "\(bu" 4support for Unicode, internationalization, and localization.SpDescribed in perluniintro, perllocale and Locale::Maketext..IP "\(bu" 4lexical scoping.SpDescribed in perlsub..IP "\(bu" 4regular expression enhancements.SpDescribed in perlre, with additional examples in perlop..IP "\(bu" 4enhanced debugger and interactive Perl environment,with integrated editor support.SpDescribed in perldebtut, perldebug and perldebguts..IP "\(bu" 4\&\s-1POSIX\s0 1003.1 compliant library.SpDescribed in \s-1POSIX\s0..PPOkay, that's \fIdefinitely\fR enough hype..SH "AVAILABILITY".IX Header "AVAILABILITY"Perl is available for most operating systems, including virtuallyall Unix-like platforms. See \*(L"Supported Platforms\*(R" in perlportfor a listing..SH "ENVIRONMENT".IX Header "ENVIRONMENT"See perlrun..SH "AUTHOR".IX Header "AUTHOR"Larry Wall <larry@wall.org>, with the help of oodles of other folks..PPIf your Perl success stories and testimonials may be of help to others who wish to advocate the use of Perl in their applications, or if you wish to simply express your gratitude to Larry and the Perl developers, please write to perl\-thanks@perl.org ..SH "FILES".IX Header "FILES".Vb 1\& "@INC" locations of perl libraries.Ve.SH "SEE ALSO".IX Header "SEE ALSO".Vb 2\& a2p awk to perl translator\& s2p sed to perl translator\&\& http://www.perl.org/ the Perl homepage\& http://www.perl.com/ Perl articles (O\*(AqReilly)\& http://www.cpan.org/ the Comprehensive Perl Archive\& http://www.pm.org/ the Perl Mongers.Ve.SH "DIAGNOSTICS".IX Header "DIAGNOSTICS"The \f(CW\*(C`use warnings\*(C'\fR pragma (and the \fB\-w\fR switch) produces some lovely diagnostics..PPSee perldiag for explanations of all Perl's diagnostics. The \f(CW\*(C`usediagnostics\*(C'\fR pragma automatically turns Perl's normally terse warningsand errors into these longer forms..PPCompilation errors will tell you the line number of the error, with anindication of the next token or token type that was to be examined.(In a script passed to Perl via \fB\-e\fR switches, each\&\fB\-e\fR is counted as one line.).PPSetuid scripts have additional constraints that can produce errormessages such as \*(L"Insecure dependency\*(R". See perlsec..PPDid we mention that you should definitely consider using the \fB\-w\fRswitch?.SH "BUGS".IX Header "BUGS"The \fB\-w\fR switch is not mandatory..PPPerl is at the mercy of your machine's definitions of variousoperations such as type casting, \fIatof()\fR, and floating-pointoutput with \fIsprintf()\fR..PPIf your stdio requires a seek or eof between reads and writes on aparticular stream, so does Perl. (This doesn't apply to \fIsysread()\fRand \fIsyswrite()\fR.).PPWhile none of the built-in data types have any arbitrary size limits(apart from memory size), there are still a few arbitrary limits: agiven variable name may not be longer than 251 characters. Line numbersdisplayed by diagnostics are internally stored as short integers,so they are limited to a maximum of 65535 (higher numbers usually beingaffected by wraparound)..PPYou may mail your bug reports (be sure to include full configurationinformation as output by the myconfig program in the perl sourcetree, or by \f(CW\*(C`perl \-V\*(C'\fR) to perlbug@perl.org . If you've succeededin compiling perl, the \fBperlbug\fR script in the \fIutils/\fR subdirectorycan be used to help mail in a bug report..PPPerl actually stands for Pathologically Eclectic Rubbish Lister, butdon't tell anyone I said that..SH "NOTES".IX Header "NOTES"The Perl motto is \*(L"There's more than one way to do it.\*(R" Divininghow many more is left as an exercise to the reader..PPThe three principal virtues of a programmer are Laziness,Impatience, and Hubris. See the Camel Book for why.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -