📄 ch15.htm
字号:
</blockquote>
<p>
<CENTER>
<TABLE BORDERCOLOR=#000000 BORDER=1 WIDTH=80%>
<TR VALIGN=TOP><TD WIDTH=605><B>NOTE</B></TD></TR>
<TR VALIGN=TOP><TD WIDTH=605>
<BLOCKQUOTE>
<I>Dynaloader has not been implemented in Windows NT Perl 5, so that any extension which requires dynamic loading cannot be supported.</I>
</BLOCKQUOTE>
</TD></TR>
</TABLE></CENTER>
<P>
<H2><A NAME="AssociativityandPrecedenceofOperatorsfromHighesttoLowest"><FONT SIZE=5 COLOR=#FF0000>
Associativity and Precedence of Operators from Highest to
Lowest</FONT></A></H2>
<P>
<CENTER>
<TABLE BORDERCOLOR=#000000 BORDER=1 WIDTH=80%>
<TR VALIGN=TOP><TD WIDTH=459><B>Operator</B></TD><TD WIDTH=117><B>Associativity</B>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>++ -- (Autoincrement, autodecrement)</TD><TD WIDTH=117>Right
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>! ~ - (Logical not, bitwise not, numeric negate)
</TD><TD WIDTH=117>Right</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>** (Exponentiation)</TD><TD WIDTH=117>Left</TD>
</TR>
<TR VALIGN=TOP><TD WIDTH=459>=~ !~ (Match, doesn't match)</TD><TD WIDTH=117>Left
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>* / % x (Multiply, divide, modulus, string repetition)
</TD><TD WIDTH=117>Left</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>+ - . (Add, subtract, string concatenate)</TD>
<TD WIDTH=117>Left</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459><< >> (Ait shift)</TD><TD WIDTH=117>None
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>-r and other file test operators (Note: use hex() and oct() to interpret hex and octal values)
</TD><TD WIDTH=117>None</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>The named unary operators</TD><TD WIDTH=117>None
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>< <= > >= lt le gt ge (The "not equal" operators)
</TD><TD WIDTH=117>None</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>== != <=> eq ne cmp (The "equal" operators)
</TD><TD WIDTH=117>Left</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>& (Bitwise and)</TD><TD WIDTH=117>Left
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>| ^ (Bitwise or, bitwise exclusive or)</TD>
<TD WIDTH=117>Left</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>&& (Logical and)</TD><TD WIDTH=117>Left
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>|| (Logical or)</TD><TD WIDTH=117>None</TD>
</TR>
<TR VALIGN=TOP><TD WIDTH=459>.. (Range operator, list constructor)</TD><TD WIDTH=117>Right
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>?: (Ternary if/then/else operator)</TD><TD WIDTH=117>Right
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>+= And others (the "assignment" operators)
</TD><TD WIDTH=117>Left</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>, (comma)</TD><TD WIDTH=117>None</TD></TR>
<TR VALIGN=TOP><TD WIDTH=459>The "list" operators</TD><TD WIDTH=117>
</TD></TR>
</TABLE></CENTER>
<P>
<H2><A NAME="PredefinedCharacterClassAbbreviations"><FONT SIZE=5 COLOR=#FF0000>
Predefined Character Class Abbreviations</FONT></A></H2>
<P>
<CENTER>
<TABLE BORDERCOLOR=#000000 BORDER=1 WIDTH=80%>
<TR VALIGN=TOP><TD WIDTH=125><B>Equivalent Class</B></TD><TD WIDTH=125><B>Construct</B>
</TD><TD WIDTH=125><B>Negated Class</B></TD><TD WIDTH=144><B>Negated Construct </B>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=125>\d (digits)</TD><TD WIDTH=125>[0-9]</TD><TD WIDTH=125>\D (digits, not!)
</TD><TD WIDTH=144>[^0-9]</TD></TR>
<TR VALIGN=TOP><TD WIDTH=125>\w (words)</TD><TD WIDTH=125>[a - zA - Z0-9_]
</TD><TD WIDTH=125>\W (words, not!)</TD><TD WIDTH=144>[^a - zA - Z0-9_]
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=125>\s (space)</TD><TD WIDTH=125>[ \r\t\n\f]</TD>
<TD WIDTH=125>\S (space, not!)</TD><TD WIDTH=144>[^ \r\t\n\f]
</TD></TR>
</TABLE></CENTER>
<P>
<H2><A NAME="RegularExpressionGroupingOperatorPrecedenceHighesttoLowest"><FONT SIZE=5 COLOR=#FF0000>
Regular Expression Grouping Operator Precedence-Highest to
Lowest</FONT></A></H2>
<P>
<CENTER>
<TABLE BORDERCOLOR=#000000 BORDER=1 WIDTH=60%>
<TR VALIGN=TOP><TD WIDTH=179><B>Name</B></TD><TD WIDTH=128><B>Representation</B>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=179>Parentheses</TD><TD WIDTH=128>()</TD></TR>
<TR VALIGN=TOP><TD WIDTH=179>Multipliers</TD><TD WIDTH=128>+ * ? {m,n}</TD>
</TR>
<TR VALIGN=TOP><TD WIDTH=179>Sequence and anchoring</TD><TD WIDTH=128>abc ^ $ \b \B
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=179>Alternation</TD><TD WIDTH=128>|</TD></TR>
</TABLE></CENTER>
<P>
<H2><A NAME="FileTests"><FONT SIZE=5 COLOR=#FF0000>
File Tests</FONT></A></H2>
<P>
<CENTER>
<TABLE BORDERCOLOR=#000000 BORDER=1 WIDTH=60%>
<TR VALIGN=TOP><TD WIDTH=96><CENTER><B>-r</B></CENTER></TD><TD WIDTH=384><B>File or directory is readable</B>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-w</CENTER></TD><TD WIDTH=384>File or directory is writable
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-x</CENTER></TD><TD WIDTH=384>File or directory is excutable
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-o</CENTER></TD><TD WIDTH=384>File or directory is owned by user
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-R</CENTER></TD><TD WIDTH=384>File or directory is readable by real user, not effective user
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-W</CENTER></TD><TD WIDTH=384>File or directory is writable by real user, not effective user
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-X</CENTER></TD><TD WIDTH=384>File or directory is writable by real user, not effective user
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-O</CENTER></TD><TD WIDTH=384>File or directory is owned by real user, not effective user
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-e</CENTER></TD><TD WIDTH=384>File or directory exists
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-z</CENTER></TD><TD WIDTH=384>File exists and has zero size
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-s</CENTER></TD><TD WIDTH=384>File or directory exists and has nonzero size
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-f</CENTER></TD><TD WIDTH=384>Entry is plain file
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-d</CENTER></TD><TD WIDTH=384>Entry is a directory
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-l</CENTER></TD><TD WIDTH=384>Entry is a symlink
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-S</CENTER></TD><TD WIDTH=384>Entry is a socket
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-p</CENTER></TD><TD WIDTH=384>Entry is a pipe
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-b</CENTER></TD><TD WIDTH=384>Entry is a block-special file
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-c</CENTER></TD><TD WIDTH=384>Entry is a character-special file
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-u</CENTER></TD><TD WIDTH=384>File or directory is setuid
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-g</CENTER></TD><TD WIDTH=384>File or directory is setgid
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-k</CENTER></TD><TD WIDTH=384>File or directory has the sticky bit set
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-t</CENTER></TD><TD WIDTH=384>Isatty() on the filehandle true
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-T</CENTER></TD><TD WIDTH=384>File is text
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-B</CENTER></TD><TD WIDTH=384>File is binary
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-M</CENTER></TD><TD WIDTH=384>Modification age in days
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-A</CENTER></TD><TD WIDTH=384>Access age in days
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=96><CENTER>-C</CENTER></TD><TD WIDTH=384>Inode-modification age in days
</TD></TR>
</TABLE></CENTER>
<P>
<H2><A NAME="PerlGNUGeneralPublicLicense"><FONT SIZE=5 COLOR=#FF0000>
Perl GNU General Public License</FONT></A></H2>
<P>
Version 2, June 1991
<P>
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
<P>
675 Mass Ave, Cambridge, MA 02139, USA
<P>
Everyone is permitted to copy and distribute verbatim copies of
this license document, but changing it is not allowed.
<H3><A NAME="Preamble1">
Preamble</A></H3>
<P>
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change
free software-to make sure the software is free for all its users.
This General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit
to using it. (Some other Free Software Foundation software is
covered by the GNU Library General Public License instead.) You
can apply it to your programs, too.
<P>
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and
charge for this service if you wish), that you receive source
code or can get it if you want it, that you can change the software
or use pieces of it in new free programs; and that you know you
can do these things.
<P>
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the
rights.
<P>
These restrictions translate to certain responsibilities for you
if you distribute copies of the software, or if you modify it.
<P>
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights
that you have. You must make sure that they, too, receive or can
get the source code. And you must show them these terms so they
know their rights.
<P>
We protect your rights with two steps: (1) copyright the software,
and offer you this license which gives you legal permission to
copy, distribute and/or modify the software.
<P>
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed
on, we want its recipients to know that what they have is not
the original, so that any problems introduced by others will not
reflect on the original authors' reputations.
<P>
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a
free program will individually obtain patent licenses, in effect
making the program proprietary. To prevent this, we have made
it clear that any patent must be licensed for everyone's free
use or not licensed at all.
<P>
The precise terms and conditions for copying, distribution and
modification follow.
<H2><A NAME="GNUGeneralPublicLicense"><FONT SIZE=5 COLOR=#FF0000>
GNU General Public License</FONT></A></H2>
<H3><A NAME="TermsandConditionsforCopyingDistributionandModification">
Terms and Conditions for Copying, Distribution, and Modification
</A></H3>
<P>
<TABLE CELLPADDING=5>
<TR VALIGN=TOP><TD> 0</TD><TD>
This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program,"
below, refers to any such program or work, and a "work based
on the Program" means either the Program or any derivative
work under copyright law: that is to say, a work containing the
Program or a portion of it, either verbatim or with modifications
and/or translated into another language. (Hereinafter, translation
is included without limitation in the term "modification.")
Each licensee is addressed as "you."<BR>
Activities other than copying, distribution and modification are
not covered by this License; they are outside its scope. The act
of running the Program is not restricted, and the output from
the Program is covered only if its contents constitute a work
based on the Program (independent of having been made by running
the Program). Whether that is true depends on what the Program
does.</TD></TR></TABLE>
<OL>
<LI>You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.<BR>
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange
for a fee.
<LI>You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section
1 above, provided that you also meet all of these conditions:
</OL>
<P>
<OL>
<OL TYPE=a>
<LI>You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
<LI>You must cause any work that you distribute or publish, that
in whole or in part contains or is derived from the Program or
any part thereof, to be licensed as a whole at no charge to all
third parties under the terms of this License.
<LI>If the modified program normally reads commands interactively
when run, you must cause it, when started running for such interactive
use in the most ordinary way, to print or display an announcement
including an appropriate copyright notice and a notice that there
is no warranty (or else, saying that you provide a warranty) and
that users may redistribute the program under these conditions,
and telling the user how to view a copy of this License. (Exception:
If the Program itself is interactive but does not normally print
such an announcement, your work based on the Program is not required
to print an announcement.)<BR>
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can
be reasonably considered independent and separate works in themselves,
then this License, and its terms, do not apply to those sections
when you distribute them as separate works. But when you distribute
the same sections as part of a whole which is a work based on
the Program, the distribution of the whole must be on the terms
of this License, whose permissions for other licensees extend
to the entire whole, and thus to each and every part regardless
of who wrote it.<BR>
Thus, it is not the intent of this section to claim rights or
contest your rights to work written entirely by you; rather, the
intent is to exercise the right to control the distribution of
derivative or collective works based on the Program.<BR>
In addition, mere aggregation of another work not based on the
Program with the Program (or with a work based on the Program)
on a volume of a storage or distribution medium does not bring
the other work under the scope of this License.
</OL>
</OL>
<P>
<OL START=3>
<LI>You may copy and distribute the Program (or a work based on
it, under Section 2) in object code or executable form under the
terms of Sections 1 and 2 above provided that you also do one
of the following:
</OL>
<P>
<ol>
<OL type=a>
<LI>Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange;
or,
<LI>Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
<LI>Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you received
the program in object code or executable form with such an offer,
in accord with Subsection b above.)<BR>
The source code for a work means the preferred form of the work
for making modifications to it. For an executable work, complete
source code means all the source code for all modules it contains,
plus any associated interface definition files, plus the scripts
used to control compilation and installation of the executable.
However, as a special exception, the source code distributed need
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -