📄 appa.htm
字号:
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">h</FONT></TT></CENTER>
</TD><TD WIDTH=324>A hex string (low <TT><FONT FACE="Courier">nybble</FONT></TT> first).
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">i</FONT></TT></CENTER>
</TD><TD WIDTH=324>A signed integer value.</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">I</FONT></TT></CENTER>
</TD><TD WIDTH=324>An unsigned integer value.</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">l</FONT></TT></CENTER>
</TD><TD WIDTH=324>A signed long value.</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">L</FONT></TT></CENTER>
</TD><TD WIDTH=324>An unsigned long value.</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">N</FONT></TT></CENTER>
</TD><TD WIDTH=324>A long in "network" order.</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">n</FONT></TT></CENTER>
</TD><TD WIDTH=324>A short in "network" order.</TD>
</TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">p</FONT></TT></CENTER>
</TD><TD WIDTH=324>A pointer to a <TT><FONT FACE="Courier">null</FONT></TT>-terminated string.
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">P</FONT></TT></CENTER>
</TD><TD WIDTH=324>A pointer to a structure (fixed-length string).
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">s</FONT></TT></CENTER>
</TD><TD WIDTH=324>A signed short value.</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">S</FONT></TT></CENTER>
</TD><TD WIDTH=324>An unsigned short value.</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">u</FONT></TT></CENTER>
</TD><TD WIDTH=324>A uuencoded string.</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">V</FONT></TT></CENTER>
</TD><TD WIDTH=324>A long in "VAX" (little-endian) order.
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">v</FONT></TT></CENTER>
</TD><TD WIDTH=324>A short in "VAX" (little-endian) order.
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">x</FONT></TT></CENTER>
</TD><TD WIDTH=324>A <TT><FONT FACE="Courier">null</FONT></TT> byte.
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=85><CENTER><TT><FONT FACE="Courier">X</FONT></TT></CENTER>
</TD><TD WIDTH=324>Backs up a byte.</TD></TR>
</TABLE></CENTER>
<P>
<P>
Each letter may optionally be prepended by a number to allow it
to be repeated. Use a <TT><FONT FACE="Courier">*</FONT></TT> for
the repeat count to all remaining items in a list. The <TT><FONT FACE="Courier">pack</FONT></TT>
function will use as many values as needed but requires specifications
for <TT><FONT FACE="Courier">a</FONT></TT>, <TT><FONT FACE="Courier">A</FONT></TT>,
<TT><FONT FACE="Courier">b</FONT></TT>, <TT><FONT FACE="Courier">B</FONT></TT>,
<TT><FONT FACE="Courier">h</FONT></TT> <TT><FONT FACE="Courier">H</FONT></TT>,
and <TT><FONT FACE="Courier">`P</FONT></TT>.
<H4><TT><FONT FACE="Courier">package nameSPACE</FONT></TT></H4>
<P>
Used for declaring packages. <A HREF="ch4.htm" tppabs="http://www.mcp.com/815097600/0-672/0-672-30891-6/ch4.htm" >See Chapter 4</A>,
"Introduction to Perl Modules."
<H4><TT><FONT FACE="Courier">pipe readhandle,writehandle</FONT></TT>
</H4>
<P>
Creates a pair of connected pipes, like the corresponding system
call. <A HREF="ch14.htm" tppabs="http://www.mcp.com/815097600/0-672/0-672-30891-6/ch14.htm" >See Chapter 14</A>, "Signals, Pipes,
FIFOs, and Perl."
<H4><TT><FONT FACE="Courier">pop @array</FONT></TT></H4>
<P>
Removes and returns the last value of an array. The array is shortened
by one element. Returns <TT><FONT FACE="Courier">undef</FONT></TT>
if <TT><FONT FACE="Courier">@array</FONT></TT> is empty. Uses
the <TT><FONT FACE="Courier">@ARGV</FONT></TT> array in the main
program or the <TT><FONT FACE="Courier">@_</FONT></TT> array in
subroutines if the <TT><FONT FACE="Courier">@array</FONT></TT>
is not specified.
<H4><TT><FONT FACE="Courier">pos ScalarVariable</FONT></TT></H4>
<P>
Returns the offset of where the last matched search left off for
the <TT><FONT FACE="Courier">scalarVariable</FONT></TT>.
<H4><TT><FONT FACE="Courier">print [FILEHANDLE] LIST</FONT></TT>
</H4>
<P>
Prints a string or a comma-separated list of strings. Returns
<TT><FONT FACE="Courier">true</FONT></TT> if successful. Writes
to <TT><FONT FACE="Courier">FILEHANDLE</FONT></TT> when specified
or uses <TT><FONT FACE="Courier">STDOUT</FONT></TT> as the default
if no other output has been selected.
<H4><TT><FONT FACE="Courier">printf [FILEHANDLE] LIST</FONT></TT>
</H4>
<P>
Just like the C call to <TT><FONT FACE="Courier">printf</FONT></TT>.
<H4><TT><FONT FACE="Courier">push @array,@list</FONT></TT></H4>
<P>
Stacks the items in <TT><FONT FACE="Courier">@list</FONT></TT>
onto the end of <TT><FONT FACE="Courier">@array</FONT></TT>.
<H4><TT><FONT FACE="Courier">q/STRING/<BR>
qq/STRING/<BR>
qx/STRING/<BR>
qw/STRING/</FONT></TT></H4>
<P>
Generalized quotes for strings.
<H4><TT><FONT FACE="Courier">quotemeta String</FONT></TT></H4>
<P>
Returns a copy of <TT><FONT FACE="Courier">String</FONT></TT>
with all the regular expression metacharacters backslashed. <A HREF="ch7.htm" tppabs="http://www.mcp.com/815097600/0-672/0-672-30891-6/ch7.htm" >See Chapter 7</A>,
"Strings and Patterns."
<H4><TT><FONT FACE="Courier">rand [Number]</FONT></TT></H4>
<P>
Returns a random fractional number between 0 and the value of
<TT><FONT FACE="Courier">Number</FONT></TT>.<TT><FONT FACE="Courier">
Number</FONT></TT> must be positive. If <TT><FONT FACE="Courier">Number</FONT></TT>
is not provided, a value between 0 and 1 is returned. Use <TT><FONT FACE="Courier">srand()</FONT></TT>
to seed this function.
<H4><TT><FONT FACE="Courier">read FILEHANDLE,scalar,length[,offset]</FONT></TT>
</H4>
<P>
Reads <TT><FONT FACE="Courier">length</FONT></TT> bytes of data
into variable <TT><FONT FACE="Courier">scalar</FONT></TT> from
the <TT><FONT FACE="Courier">FILEHANDLE</FONT></TT>. Returns the
number of bytes actually read, or <TT><FONT FACE="Courier">undef</FONT></TT>
in the case of an error. The <TT><FONT FACE="Courier">scalar</FONT></TT>
will be grown or shrunk to the length actually read. The <TT><FONT FACE="Courier">offset</FONT></TT>
to write input in the string to is defaulted to 0 if no <TT><FONT FACE="Courier">offset</FONT></TT>
is explicitly passed as the fourth parameter.
<H4><TT><FONT FACE="Courier">readdir DIRHANDLE</FONT></TT></H4>
<P>
Returns the next directory entry for a directory opened by <TT><FONT FACE="Courier">opendir()</FONT></TT>.
If used in a list context, it returns all the rest of the entries
in the directory. For no more entries, it returns an <TT><FONT FACE="Courier">undef</FONT></TT>
value or an empty list if used in list context.
<H4><TT><FONT FACE="Courier">readlink [Expression]</FONT></TT>
</H4>
<P>
Returns the value of a symbolic link. Crashes the program if symbolic
links are not implemented. Upon error, it returns the undefined
value and sets <TT><FONT FACE="Courier">$!</FONT></TT>. Uses <TT><FONT FACE="Courier">$_</FONT></TT>
for input if <TT><FONT FACE="Courier">Expression</FONT></TT> is
not provided.
<H4><TT><FONT FACE="Courier">recv SOCKET,scalar,len,flags</FONT></TT>
</H4>
<P>
Receives a message on a socket. <A HREF="ch12.htm" tppabs="http://www.mcp.com/815097600/0-672/0-672-30891-6/ch12.htm" >See Chapter 12</A>.
The data is read into the <TT><FONT FACE="Courier">scalar</FONT></TT>
variable from the specified <TT><FONT FACE="Courier">SOCKET</FONT></TT>
file handle up to <TT><FONT FACE="Courier">len</FONT></TT> bytes.
The <TT><FONT FACE="Courier">flags</FONT></TT> are as defined
in the <TT><FONT FACE="Courier">recvfrom(2)</FONT></TT> system
call.
<H4><TT><FONT FACE="Courier">redo [LABEL]</FONT></TT></H4>
<P>
The <TT><FONT FACE="Courier">redo</FONT></TT> command restarts
a loop block without evaluating the conditional again. The <TT><FONT FACE="Courier">continue</FONT></TT>
block, if any, is not executed. If the <TT><FONT FACE="Courier">LABEL</FONT></TT>
is omitted, the command refers to the innermost enclosing loop.
<H4><TT><FONT FACE="Courier">ref Expression</FONT></TT></H4>
<P>
Returns <TT><FONT FACE="Courier">true</FONT></TT> if <TT><FONT FACE="Courier">Expression</FONT></TT>
is a reference, or <TT><FONT FACE="Courier">false</FONT></TT>
if it is not. The function returns the name of the package if
<TT><FONT FACE="Courier">Expression</FONT></TT> is a pointer to
an object.
<H4><TT><FONT FACE="Courier">rename oldName,newName</FONT></TT>
</H4>
<P>
Changes the name of the file <TT><FONT FACE="Courier">oldName</FONT></TT>
to <TT><FONT FACE="Courier">newName</FONT></TT>. Returns <TT><FONT FACE="Courier">1</FONT></TT>
for success, 0 otherwise. This function does not work across file
system boundaries.
<H4><TT><FONT FACE="Courier">require [Expression]</FONT></TT>
</H4>
<P>
Uses either <TT><FONT FACE="Courier">Expression</FONT></TT> or,
if no <TT><FONT FACE="Courier">Expression</FONT></TT> is provided,
<TT><FONT FACE="Courier">$_</FONT></TT> to determine if some semantics
are present. If <TT><FONT FACE="Courier">Expression</FONT></TT>
evaluates to a number, it demands that the current version of
Perl (<TT><FONT FACE="Courier">$]</FONT></TT>) be at least that
number. If <TT><FONT FACE="Courier">Expression</FONT></TT> evaluates
to a string, the string is used as the name of the library file
to load. Prevents a file from being loaded in twice if the file
being loaded in has a <TT><FONT FACE="Courier">1;</FONT></TT>
statement terminating it. (<TT><FONT FACE="Courier">1;</FONT></TT>
indicates that the file loaded and initialized itself correctly.)
<P>
If <TT><FONT FACE="Courier">Expression</FONT></TT> is a bare word,
<TT><FONT FACE="Courier">require</FONT></TT> assumes a <TT><FONT FACE="Courier">.pm</FONT></TT>
extension for you, to make it easy to load standard modules. This
form of loading of modules does not risk altering your name space.
<H4><TT><FONT FACE="Courier">reset [Expression]</FONT></TT></H4>
<P>
Clears values of variables whose names begin with letters in the
<TT><FONT FACE="Courier">Expression</FONT></TT>. More than one
letter can be specified using ranges. Uses the <TT><FONT FACE="Courier">??</FONT></TT>
special variable if <TT><FONT FACE="Courier">Expression</FONT></TT>
is not specified. The <TT><FONT FACE="Courier">reset</FONT></TT>
function always returns a <TT><FONT FACE="Courier">true</FONT></TT>
value. Here are some examples:
<BLOCKQUOTE>
<TT><FONT FACE="Courier">reset 'M'; # reset all
M* named variables<BR>
reset 'a-z'; # reset lower case variables<BR>
reset; # just reset those
listed in ?? searches</FONT></TT>
</BLOCKQUOTE>
<P>
<I>Do</I> <I>not</I> use <TT><FONT FACE="Courier">reset 'A-Z';</FONT></TT>
because this will blow away your environment variables <TT><FONT FACE="Courier">ENV</FONT></TT>
and <TT><FONT FACE="Courier">ARGV</FONT></TT>!
<H4><TT><FONT FACE="Courier">return arguments</FONT></TT></H4>
<P>
Used to return the list of arguments at the end of a subroutine.
A subroutine always returns the result of the last expression
in it if no <TT><FONT FACE="Courier">return</FONT></TT> statement
is found.
<H4><TT><FONT FACE="Courier">reverse @list<BR>
reverse String</FONT></TT></H4>
<P>
Reverses the order of items in <TT><FONT FACE="Courier">@list</FONT></TT>.
Reverses the order of characters in <TT><FONT FACE="Courier">String</FONT></TT>.
<H4><TT><FONT FACE="Courier">rewinddir DIRHANDLE</FONT></TT></H4>
<P>
Resets the current position to the start of the directory for
use with the <TT><FONT FACE="Courier">readdir()</FONT></TT> routine
on <TT><FONT FACE="Courier">DIRHANDLE</FONT></TT>.
<H4><TT><FONT FACE="Courier">rindex str,substr[,position]</FONT></TT>
</H4>
<P>
Gets the position of the last occurrence of <TT><FONT FACE="Courier">substr</FONT></TT>
in <TT><FONT FACE="Courier">str</FONT></TT>. Starts the search
from the end of string unless a position has been specified. If
a position is specified, starts the search at the position from
the end of the string.
<H4><TT><FONT FACE="Courier">rmdir [DirName]</FONT></TT></H4>
<P>
Removes the directory specified by <TT><FONT FACE="Courier">DirName</FONT></TT>,
but only if the directory is empty. Uses <TT><FONT FACE="Courier">$_</FONT></TT>
if no <TT><FONT FACE="Courier">DirName</FONT></TT> is given. Returns
<TT><FONT FACE="Courier">1</FONT></TT> on success and <TT><FONT FACE="Courier">0</FONT></TT>
otherwise with the error code in <TT><FONT FACE="Courier">$!</FONT></TT>.
<H4><TT><FON
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -