summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-01-29 14:56:01 +0000
committerNicholas Clark <nick@ccl4.org>2012-02-18 13:16:52 +0100
commitc17cdb7237c28869f5b1e32776642668fb49707c (patch)
tree5f3d7ade25fb018ba763f3642b710819f9579d47
parentd5f215f1125cc143063ff70a0f2901c3b5720deb (diff)
downloadperl-c17cdb7237c28869f5b1e32776642668fb49707c.tar.gz
Add annotations to perlfunc.pod for Pod::Functions.
In the list for "Perl Functions by Category" each item is annotated with its type as used internally by Pod::Functions. In the "Alphabetical Listing of Perl Functions" each function is annotated with the summary description returned by %Pod::Functions::Flavor.
-rw-r--r--pod/perlfunc.pod498
1 files changed, 498 insertions, 0 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 7e93eae851..c4aa935ea1 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -107,6 +107,8 @@ than one place.
=item Functions for SCALARs or strings
X<scalar> X<string> X<character>
+=for Pod::Functions =String
+
C<chomp>, C<chop>, C<chr>, C<crypt>, C<fc>, C<hex>, C<index>, C<lc>,
C<lcfirst>, C<length>, C<oct>, C<ord>, C<pack>, C<q//>, C<qq//>, C<reverse>,
C<rindex>, C<sprintf>, C<substr>, C<tr///>, C<uc>, C<ucfirst>, C<y///>
@@ -119,32 +121,44 @@ with a C<use v5.16> (or higher) declaration in the current scope.
=item Regular expressions and pattern matching
X<regular expression> X<regex> X<regexp>
+=for Pod::Functions =Regexp
+
C<m//>, C<pos>, C<qr//>, C<quotemeta>, C<s///>, C<split>, C<study>
=item Numeric functions
X<numeric> X<number> X<trigonometric> X<trigonometry>
+=for Pod::Functions =Math
+
C<abs>, C<atan2>, C<cos>, C<exp>, C<hex>, C<int>, C<log>, C<oct>, C<rand>,
C<sin>, C<sqrt>, C<srand>
=item Functions for real @ARRAYs
X<array>
+=for Pod::Functions =ARRAY
+
C<each>, C<keys>, C<pop>, C<push>, C<shift>, C<splice>, C<unshift>, C<values>
=item Functions for list data
X<list>
+=for Pod::Functions =LIST
+
C<grep>, C<join>, C<map>, C<qw//>, C<reverse>, C<sort>, C<unpack>
=item Functions for real %HASHes
X<hash>
+=for Pod::Functions =HASH
+
C<delete>, C<each>, C<exists>, C<keys>, C<values>
=item Input and output functions
X<I/O> X<input> X<output> X<dbm>
+=for Pod::Functions =I/O
+
C<binmode>, C<close>, C<closedir>, C<dbmclose>, C<dbmopen>, C<die>, C<eof>,
C<fileno>, C<flock>, C<format>, C<getc>, C<print>, C<printf>, C<read>,
C<readdir>, C<readline> C<rewinddir>, C<say>, C<seek>, C<seekdir>, C<select>,
@@ -157,12 +171,16 @@ with a C<use v5.10> (or higher) declaration in the current scope.
=item Functions for fixed-length data or records
+=for Pod::Functions =Binary
+
C<pack>, C<read>, C<syscall>, C<sysread>, C<sysseek>, C<syswrite>, C<unpack>,
C<vec>
=item Functions for filehandles, files, or directories
X<file> X<filehandle> X<directory> X<pipe> X<link> X<symlink>
+=for Pod::Functions =File
+
C<-I<X>>, C<chdir>, C<chmod>, C<chown>, C<chroot>, C<fcntl>, C<glob>,
C<ioctl>, C<link>, C<lstat>, C<mkdir>, C<open>, C<opendir>,
C<readlink>, C<rename>, C<rmdir>, C<stat>, C<symlink>, C<sysopen>,
@@ -171,6 +189,8 @@ C<umask>, C<unlink>, C<utime>
=item Keywords related to the control flow of your Perl program
X<control flow>
+=for Pod::Functions =Flow
+
C<caller>, C<continue>, C<die>, C<do>,
C<dump>, C<eval>, C<evalbytes> C<exit>,
C<__FILE__>, C<goto>, C<last>, C<__LINE__>, C<next>, C<__PACKAGE__>,
@@ -184,6 +204,8 @@ with a C<use v5.16> (or higher) declaration in the current scope.
=item Keywords related to the switch feature
+=for Pod::Functions =Switch
+
C<break>, C<continue>, C<default>, C<given>, C<when>
Except for C<continue>, these are available only if you enable the
@@ -195,6 +217,8 @@ feature, like the other keywords.
=item Keywords related to scoping
+=for Pod::Functions =Namespace
+
C<caller>, C<import>, C<local>, C<my>, C<our>, C<package>, C<state>, C<use>
C<state> is available only if the C<"state"> feature is enabled or if it is
@@ -203,6 +227,8 @@ with a C<use v5.10> (or higher) declaration in the current scope.
=item Miscellaneous functions
+=for Pod::Functions =Misc
+
C<defined>, C<dump>, C<eval>, C<evalbytes>,
C<formline>, C<local>, C<lock>, C<my>, C<our>, C<prototype>,
C<reset>, C<scalar>, C<state>, C<undef>, C<wantarray>
@@ -210,6 +236,8 @@ C<reset>, C<scalar>, C<state>, C<undef>, C<wantarray>
=item Functions for processes and process groups
X<process> X<pid> X<process id>
+=for Pod::Functions =Process
+
C<alarm>, C<exec>, C<fork>, C<getpgrp>, C<getppid>, C<getpriority>, C<kill>,
C<pipe>, C<qx//>, C<readpipe>, C<setpgrp>,
C<setpriority>, C<sleep>, C<system>,
@@ -218,17 +246,23 @@ C<times>, C<wait>, C<waitpid>
=item Keywords related to Perl modules
X<module>
+=for Pod::Functions =Modules
+
C<do>, C<import>, C<no>, C<package>, C<require>, C<use>
=item Keywords related to classes and object-orientation
X<object> X<class> X<package>
+=for Pod::Functions =Objects
+
C<bless>, C<dbmclose>, C<dbmopen>, C<package>, C<ref>, C<tie>, C<tied>,
C<untie>, C<use>
=item Low-level socket functions
X<socket> X<sock>
+=for Pod::Functions =Socket
+
C<accept>, C<bind>, C<connect>, C<getpeername>, C<getsockname>,
C<getsockopt>, C<listen>, C<recv>, C<send>, C<setsockopt>, C<shutdown>,
C<socket>, C<socketpair>
@@ -236,12 +270,16 @@ C<socket>, C<socketpair>
=item System V interprocess communication functions
X<IPC> X<System V> X<semaphore> X<shared memory> X<memory> X<message>
+=for Pod::Functions =SysV
+
C<msgctl>, C<msgget>, C<msgrcv>, C<msgsnd>, C<semctl>, C<semget>, C<semop>,
C<shmctl>, C<shmget>, C<shmread>, C<shmwrite>
=item Fetching user and group info
X<user> X<group> X<password> X<uid> X<gid> X<passwd> X</etc/passwd>
+=for Pod::Functions =User
+
C<endgrent>, C<endhostent>, C<endnetent>, C<endpwent>, C<getgrent>,
C<getgrgid>, C<getgrnam>, C<getlogin>, C<getpwent>, C<getpwnam>,
C<getpwuid>, C<setgrent>, C<setpwent>
@@ -249,6 +287,8 @@ C<getpwuid>, C<setgrent>, C<setpwent>
=item Fetching network info
X<network> X<protocol> X<host> X<hostname> X<IP> X<address> X<service>
+=for Pod::Functions =Network
+
C<endprotoent>, C<endservent>, C<gethostbyaddr>, C<gethostbyname>,
C<gethostent>, C<getnetbyaddr>, C<getnetbyname>, C<getnetent>,
C<getprotobyname>, C<getprotobynumber>, C<getprotoent>,
@@ -258,10 +298,14 @@ C<setnetent>, C<setprotoent>, C<setservent>
=item Time-related functions
X<time> X<date>
+=for Pod::Functions =Time
+
C<gmtime>, C<localtime>, C<time>, C<times>
=item Non-function keywords
+=for Pod::Functions =!Non-functions
+
C<and>, C<AUTOLOAD>, C<BEGIN>, C<CHECK>, C<cmp>, C<CORE>, C<__DATA__>,
C<DESTROY>, C<else>, C<elseif>, C<elsif>, C<END>, C<__END__>, C<eq>, C<for>,
C<foreach>, C<ge>, C<gt>, C<if>, C<INIT>, C<le>, C<lt>, C<ne>, C<not>, C<or>,
@@ -313,6 +357,8 @@ X<-S>X<-b>X<-c>X<-t>X<-u>X<-g>X<-k>X<-T>X<-B>X<-M>X<-A>X<-C>
=item -X
+=for Pod::Functions a file test (-r, -x, etc)
+
A file test, where X is one of the letters listed below. This unary
operator takes one argument, either a filename, a filehandle, or a dirhandle,
and tests the associated file to see if something is true about it. If the
@@ -457,12 +503,16 @@ X<abs> X<absolute>
=item abs
+=for Pod::Functions absolute value function
+
Returns the absolute value of its argument.
If VALUE is omitted, uses C<$_>.
=item accept NEWSOCKET,GENERICSOCKET
X<accept>
+=for Pod::Functions accept an incoming socket connect
+
Accepts an incoming socket connect, just as accept(2)
does. Returns the packed address if it succeeded, false otherwise.
See the example in L<perlipc/"Sockets: Client/Server Communication">.
@@ -478,6 +528,8 @@ X<timer>
=item alarm
+=for Pod::Functions schedule a SIGALRM
+
Arranges to have a SIGALRM delivered to this process after the
specified number of wallclock seconds has elapsed. If SECONDS is not
specified, the value stored in C<$_> is used. (On some machines,
@@ -527,6 +579,8 @@ Portability issues: L<perlport/alarm>.
=item atan2 Y,X
X<atan2> X<arctangent> X<tan> X<tangent>
+=for Pod::Functions arctangent of Y/X in the range -PI to PI
+
Returns the arctangent of Y/X in the range -PI to PI.
For the tangent operation, you may use the C<Math::Trig::tan>
@@ -542,6 +596,8 @@ Portability issues: L<perlport/atan2>.
=item bind SOCKET,NAME
X<bind>
+=for Pod::Functions binds an address to a socket
+
Binds a network address to a socket, just as bind(2)
does. Returns true if it succeeded, false otherwise. NAME should be a
packed address of the appropriate type for the socket. See the examples in
@@ -552,6 +608,8 @@ X<binmode> X<binary> X<text> X<DOS> X<Windows>
=item binmode FILEHANDLE
+=for Pod::Functions prepare binary files for I/O
+
Arranges for FILEHANDLE to be read or written in "binary" or "text"
mode on systems where the run-time libraries distinguish between
binary and text files. If FILEHANDLE is an expression, the value is
@@ -645,6 +703,8 @@ X<bless>
=item bless REF
+=for Pod::Functions create an object
+
This function tells the thingy referenced by REF that it is now an object
in the CLASSNAME package. If CLASSNAME is omitted, the current package
is used. Because a C<bless> is often the last thing in a constructor,
@@ -662,6 +722,8 @@ See L<perlmod/"Perl Modules">.
=item break
+=for Pod::Functions break out of a C<given> block
+
Break out of a C<given()> block.
This keyword is enabled by the C<"switch"> feature: see
@@ -674,6 +736,8 @@ X<caller> X<call stack> X<stack> X<stack trace>
=item caller
+=for Pod::Functions get context of the current subroutine call
+
Returns the context of the current subroutine call. In scalar context,
returns the caller's package name if there I<is> a caller (that is, if
we're in a subroutine or C<eval> or C<require>) and the undefined value
@@ -747,6 +811,8 @@ X<directory, change>
=item chdir
+=for Pod::Functions change your current working directory
+
Changes the working directory to EXPR, if possible. If EXPR is omitted,
changes to the directory specified by C<$ENV{HOME}>, if set; if not,
changes to the directory specified by C<$ENV{LOGDIR}>. (Under VMS, the
@@ -761,6 +827,8 @@ passing handles raises an exception.
=item chmod LIST
X<chmod> X<permission> X<mode>
+=for Pod::Functions changes the permissions on a list of files
+
Changes the permissions of a list of files. The first element of the
list must be the numeric mode, which should probably be an octal
number, and which definitely should I<not> be a string of octal digits:
@@ -799,6 +867,8 @@ X<chomp> X<INPUT_RECORD_SEPARATOR> X<$/> X<newline> X<eol>
=item chomp
+=for Pod::Functions remove a trailing record separator from a string
+
This safer version of L</chop> removes any trailing string
that corresponds to the current value of C<$/> (also known as
$INPUT_RECORD_SEPARATOR in the C<English> module). It returns the total
@@ -841,6 +911,8 @@ X<chop>
=item chop
+=for Pod::Functions remove the last character from a string
+
Chops off the last character of a string and returns the character
chopped. It is much more efficient than C<s/.$//s> because it neither
scans nor copies the string. If VARIABLE is omitted, chops C<$_>.
@@ -859,6 +931,8 @@ See also L</chomp>.
=item chown LIST
X<chown> X<owner> X<user> X<group>
+=for Pod::Functions change the ownership on a list of files
+
Changes the owner (and group) of a list of files. The first two
elements of the list must be the I<numeric> uid and gid, in that
order. A value of -1 in either position is interpreted by most
@@ -902,6 +976,8 @@ X<chr> X<character> X<ASCII> X<Unicode>
=item chr
+=for Pod::Functions get character this number represents
+
Returns the character represented by that NUMBER in the character set.
For example, C<chr(65)> is C<"A"> in either ASCII or Unicode, and
chr(0x263a) is a Unicode smiley face.
@@ -924,6 +1000,8 @@ X<chroot> X<root>
=item chroot
+=for Pod::Functions make directory new root for path lookups
+
This function works like the system call by the same name: it makes the
named directory the new root directory for all further pathnames that
begin with a C</> by your process and all its children. (It doesn't
@@ -938,6 +1016,8 @@ X<close>
=item close
+=for Pod::Functions close file (or pipe or socket) handle
+
Closes the file or pipe associated with the filehandle, flushes the IO
buffers, and closes the system file descriptor. Returns true if those
operations succeed and if no error was reported by any PerlIO
@@ -983,12 +1063,16 @@ filehandle, usually the real filehandle name or an autovivified handle.
=item closedir DIRHANDLE
X<closedir>
+=for Pod::Functions close directory handle
+
Closes a directory opened by C<opendir> and returns the success of that
system call.
=item connect SOCKET,NAME
X<connect>
+=for Pod::Functions connect to a remote socket
+
Attempts to connect to a remote socket, just like connect(2).
Returns true if it succeeded, false otherwise. NAME should be a
packed address of the appropriate type for the socket. See the examples in
@@ -999,6 +1083,8 @@ X<continue>
=item continue
+=for Pod::Functions optional trailing block in a while or foreach
+
When followed by a BLOCK, C<continue> is actually a
flow control statement rather than a function. If
there is a C<continue> BLOCK attached to a BLOCK (typically in a C<while> or
@@ -1040,6 +1126,8 @@ X<cos> X<cosine> X<acos> X<arccosine>
=item cos
+=for Pod::Functions cosine function
+
Returns the cosine of EXPR (expressed in radians). If EXPR is omitted,
takes the cosine of C<$_>.
@@ -1052,6 +1140,8 @@ function, or use this relation:
X<crypt> X<digest> X<hash> X<salt> X<plaintext> X<password>
X<decrypt> X<cryptography> X<passwd> X<encrypt>
+=for Pod::Functions one-way passwd-style encryption
+
Creates a digest string exactly like the crypt(3) function in the C
library (assuming that you actually have a version there that has not
been extirpated as a potential munition).
@@ -1132,6 +1222,8 @@ Portability issues: L<perlport/crypt>.
=item dbmclose HASH
X<dbmclose>
+=for Pod::Functions breaks binding on a tied dbm file
+
[This function has been largely superseded by the C<untie> function.]
Breaks the binding between a DBM file and a hash.
@@ -1141,6 +1233,8 @@ Portability issues: L<perlport/dbmclose>.
=item dbmopen HASH,DBNAME,MASK
X<dbmopen> X<dbm> X<ndbm> X<sdbm> X<gdbm>
+=for Pod::Functions create binding on a tied dbm file
+
[This function has been largely superseded by the
L<tie|/tie VARIABLE,CLASSNAME,LIST> function.]
@@ -1189,6 +1283,8 @@ Portability issues: L<perlport/dbmopen>.
=item default BLOCK
+=for Pod::Functions !RT #108848
+
Within a C<foreach> or a C<given>, a C<default> BLOCK acts like a C<when>
that's always true. Only available after Perl 5.10, and only if the
C<switch> feature has been requested or if the keyword is prefixed with
@@ -1199,6 +1295,8 @@ X<defined> X<undef> X<undefined>
=item defined
+=for Pod::Functions test whether a value, variable, or function is defined
+
Returns a Boolean value telling whether EXPR has a value other than
the undefined value C<undef>. If EXPR is not present, C<$_> is
checked.
@@ -1261,6 +1359,8 @@ See also L</undef>, L</exists>, L</ref>.
=item delete EXPR
X<delete>
+=for Pod::Functions deletes a value from a hash
+
Given an expression that specifies an element or slice of a hash, C<delete>
deletes the specified elements from that hash so that exists() on that element
no longer returns true. Setting a hash element to the undefined value does
@@ -1334,6 +1434,8 @@ final operation is an element or slice of an aggregate:
=item die LIST
X<die> X<throw> X<exception> X<raise> X<$@> X<abort>
+=for Pod::Functions raise an exception or bail out
+
C<die> raises an exception. Inside an C<eval> the error message is stuffed
into C<$@> and the C<eval> is terminated with the undefined value.
If the exception is outside of all enclosing C<eval>s, then the uncaught
@@ -1441,6 +1543,8 @@ See also exit(), warn(), and the Carp module.
=item do BLOCK
X<do> X<block>
+=for Pod::Functions turn a BLOCK into a TERM
+
Not really a function. Returns the value of the last command in the
sequence of commands indicated by BLOCK. When modified by the C<while> or
C<until> loop modifier, executes the BLOCK once before testing the loop
@@ -1506,6 +1610,8 @@ X<dump> X<core> X<undump>
=item dump
+=for Pod::Functions create an immediate core dump
+
This function causes an immediate core dump. See also the B<-u>
command-line switch in L<perlrun>, which does the same thing.
Primarily this is so that you can use the B<undump> program (not
@@ -1535,6 +1641,8 @@ X<array, iterator>
=item each EXPR
+=for Pod::Functions retrieve the next key/value pair from a hash
+
When called on a hash in list context, returns a 2-element list
consisting of the key and value for the next element of a hash. In Perl
5.12 and later only, it will also return the index and value for the next
@@ -1599,6 +1707,8 @@ X<end-of-file>
=item eof
+=for Pod::Functions test a filehandle for its end
+
Returns 1 if the next read on FILEHANDLE will return end of file I<or> if
FILEHANDLE is not open. FILEHANDLE may be an expression whose value
gives the real filehandle. (Note that this function actually
@@ -1651,6 +1761,8 @@ X<error, handling> X<exception, handling>
=item eval
+=for Pod::Functions catch exceptions or compile and run code
+
In the first form, the return value of EXPR is parsed and executed as if it
were a little Perl program. The value of the expression (which is itself
determined within scalar context) is first parsed, and if there were no
@@ -1807,6 +1919,8 @@ X<evalbytes>
=item evalbytes
+=for Pod::Functions similar to string eval, but intend to parse a bytestream
+
This function is like L</eval> with a string argument, except it always
parses its argument, or C<$_> if EXPR is omitted, as a string of bytes. A
string containing characters whose ordinal value exceeds 255 results in an
@@ -1822,6 +1936,8 @@ X<exec> X<execute>
=item exec PROGRAM LIST
+=for Pod::Functions abandon this program to run another
+
The C<exec> function executes a system command I<and never returns>;
use C<system> instead of C<exec> if you want it to return. It fails and
returns false only if the command does not exist I<and> it is executed
@@ -1898,6 +2014,8 @@ Portability issues: L<perlport/exec>.
=item exists EXPR
X<exists> X<autovivification>
+=for Pod::Functions test whether a hash key is present
+
Given an expression that specifies an element of a hash, returns true if the
specified element in the hash has ever been initialized, even if the
corresponding value is undefined.
@@ -1965,6 +2083,8 @@ X<exit> X<terminate> X<abort>
=item exit
+=for Pod::Functions terminate this program
+
Evaluates EXPR and exits immediately with that value. Example:
$ans = <STDIN>;
@@ -1996,6 +2116,8 @@ X<exp> X<exponential> X<antilog> X<antilogarithm> X<e>
=item exp
+=for Pod::Functions raise I<e> to a power
+
Returns I<e> (the natural logarithm base) to the power of EXPR.
If EXPR is omitted, gives C<exp($_)>.
@@ -2004,6 +2126,8 @@ X<fc> X<foldcase> X<casefold> X<fold-case> X<case-fold>
=item fc
+=for Pod::Functions return casefolded version of a string
+
Returns the casefolded version of EXPR. This is the internal function
implementing the C<\F> escape in double-quoted strings.
@@ -2050,6 +2174,8 @@ include a C<use v5.16> or later to the current scope.
=item fcntl FILEHANDLE,FUNCTION,SCALAR
X<fcntl>
+=for Pod::Functions file control system call
+
Implements the fcntl(2) function. You'll probably have to say
use Fcntl;
@@ -2089,11 +2215,15 @@ Portability issues: L<perlport/fcntl>.
=item __FILE__
X<__FILE__>
+=for Pod::Functions the name of the current source file
+
A special token that returns the name of the file in which it occurs.
=item fileno FILEHANDLE
X<fileno>
+=for Pod::Functions return file descriptor from filehandle
+
Returns the file descriptor for a filehandle, or undefined if the
filehandle is not open. If there is no real file descriptor at the OS
level, as can happen with filehandles connected to memory objects via
@@ -2114,6 +2244,8 @@ same underlying descriptor:
=item flock FILEHANDLE,OPERATION
X<flock> X<lock> X<locking>
+=for Pod::Functions lock an entire file with an advisory lock
+
Calls flock(2), or an emulation of it, on FILEHANDLE. Returns true
for success, false on failure. Produces a fatal error if used on a
machine that doesn't implement flock(2), fcntl(2) locking, or lockf(3).
@@ -2196,6 +2328,8 @@ Portability issues: L<perlport/flock>.
=item fork
X<fork> X<child> X<parent>
+=for Pod::Functions create a new process just like this one
+
Does a fork(2) system call to create a new process running the
same program at the same point. It returns the child pid to the
parent process, C<0> to the child process, or C<undef> if the fork is
@@ -2234,6 +2368,8 @@ Portability issues: L<perlport/fork>.
=item format
X<format>
+=for Pod::Functions declare a picture format with use by the write() function
+
Declare a picture format for use by the C<write> function. For
example:
@@ -2252,6 +2388,8 @@ See L<perlform> for many details and examples.
=item formline PICTURE,LIST
X<formline>
+=for Pod::Functions internal function used for formats
+
This is an internal function used by C<format>s, though you may call it,
too. It formats (see L<perlform>) a list of values according to the
contents of PICTURE, placing the output into the format output
@@ -2278,6 +2416,8 @@ X<getc> X<getchar> X<character> X<file, read>
=item getc
+=for Pod::Functions get the next character from the filehandle
+
Returns the next character from the input file attached to FILEHANDLE,
or the undefined value at end of file or if there was an error (in
the latter case C<$!> is set). If FILEHANDLE is omitted, reads from
@@ -2313,6 +2453,8 @@ L<perlmodlib/CPAN>.
=item getlogin
X<getlogin> X<login>
+=for Pod::Functions return who logged in at this tty
+
This implements the C library function of the same name, which on most
systems returns the current login from F</etc/utmp>, if any. If it
returns the empty string, use C<getpwuid>.
@@ -2327,6 +2469,8 @@ Portability issues: L<perlport/getlogin>.
=item getpeername SOCKET
X<getpeername> X<peer>
+=for Pod::Functions find the other end of a socket connection
+
Returns the packed sockaddr address of the other end of the SOCKET
connection.
@@ -2339,6 +2483,8 @@ connection.
=item getpgrp PID
X<getpgrp> X<group>
+=for Pod::Functions get process group
+
Returns the current process group for the specified PID. Use
a PID of C<0> to get the current process group for the
current process. Will raise an exception if used on a machine that
@@ -2351,6 +2497,8 @@ Portability issues: L<perlport/getpgrp>.
=item getppid
X<getppid> X<parent> X<pid>
+=for Pod::Functions get parent process ID
+
Returns the process id of the parent process.
Note for Linux users: Between v5.8.1 and v5.16.0 Perl would work
@@ -2364,6 +2512,8 @@ Portability issues: L<perlport/getppid>.
=item getpriority WHICH,WHO
X<getpriority> X<priority> X<nice>
+=for Pod::Functions get current nice value
+
Returns the current priority for a process, a process group, or a user.
(See L<getpriority(2)>.) Will raise a fatal exception if used on a
machine that doesn't implement getpriority(2).
@@ -2378,64 +2528,124 @@ X<getnetent> X<getprotoent> X<getservent> X<setpwent> X<setgrent> X<sethostent>
X<setnetent> X<setprotoent> X<setservent> X<endpwent> X<endgrent> X<endhostent>
X<endnetent> X<endprotoent> X<endservent>
+=for Pod::Functions get passwd record given user login name
+
=item getgrnam NAME
+=for Pod::Functions get group record given group name
+
=item gethostbyname NAME
+=for Pod::Functions get host record given name
+
=item getnetbyname NAME
+=for Pod::Functions get networks record given name
+
=item getprotobyname NAME
+=for Pod::Functions get protocol record given name
+
=item getpwuid UID
+=for Pod::Functions get passwd record given user ID
+
=item getgrgid GID
+=for Pod::Functions get group record given group user ID
+
=item getservbyname NAME,PROTO
+=for Pod::Functions get services record given its name
+
=item gethostbyaddr ADDR,ADDRTYPE
+=for Pod::Functions get host record given its address
+
=item getnetbyaddr ADDR,ADDRTYPE
+=for Pod::Functions get network record given its address
+
=item getprotobynumber NUMBER
+=for Pod::Functions get protocol record numeric protocol
+
=item getservbyport PORT,PROTO
+=for Pod::Functions get services record given numeric port
+
=item getpwent
+=for Pod::Functions get next passwd record
+
=item getgrent
+=for Pod::Functions get next group record
+
=item gethostent
+=for Pod::Functions get next hosts record
+
=item getnetent
+=for Pod::Functions get next networks record
+
=item getprotoent
+=for Pod::Functions get next protocols record
+
=item getservent
+=for Pod::Functions get next services record
+
=item setpwent
+=for Pod::Functions prepare passwd file for use
+
=item setgrent
+=for Pod::Functions prepare group file for use
+
=item sethostent STAYOPEN
+=for Pod::Functions prepare hosts file for use
+
=item setnetent STAYOPEN
+=for Pod::Functions prepare networks file for use
+
=item setprotoent STAYOPEN
+=for Pod::Functions prepare protocols file for use
+
=item setservent STAYOPEN
+=for Pod::Functions prepare services file for use
+
=item endpwent
+=for Pod::Functions be done using passwd file
+
=item endgrent
+=for Pod::Functions be done using group file
+
=item endhostent
+=for Pod::Functions be done using hosts file
+
=item endnetent
+=for Pod::Functions be done using networks file
+
=item endprotoent
+=for Pod::Functions be done using protocols file
+
=item endservent
+=for Pod::Functions be done using services file
+
These routines are the same as their counterparts in the
system C library. In list context, the return values from the
various get routines are as follows:
@@ -2553,6 +2763,8 @@ Portability issues: L<perlport/getpwnam> to L<perlport/endservent>.
=item getsockname SOCKET
X<getsockname>
+=for Pod::Functions retrieve the sockaddr for a given socket
+
Returns the packed sockaddr address of this end of the SOCKET connection,
in case you don't know the address because you have several different
IPs that the connection might have come in on.
@@ -2567,6 +2779,8 @@ IPs that the connection might have come in on.
=item getsockopt SOCKET,LEVEL,OPTNAME
X<getsockopt>
+=for Pod::Functions get socket options on a given socket
+
Queries the option named OPTNAME associated with SOCKET at a given LEVEL.
Options may exist at multiple protocol levels depending on the socket
type, but at least the uppermost socket level SOL_SOCKET (defined in the
@@ -2602,6 +2816,8 @@ X<given>
=item given BLOCK
+=for Pod::Functions !RT #108848
+
C<given> is analogous to the C<switch>
keyword in other languages. C<given>
and C<when> are used in Perl to implement C<switch>/C<case> like statements.
@@ -2627,6 +2843,8 @@ X<glob> X<wildcard> X<filename, expansion> X<expand>
=item glob
+=for Pod::Functions expand filenames using wildcards
+
In list context, returns a (possibly empty) list of filename expansions on
the value of EXPR such as the standard Unix shell F</bin/csh> would do. In
scalar context, glob iterates through such filename expansions, returning
@@ -2671,6 +2889,8 @@ X<gmtime> X<UTC> X<Greenwich>
=item gmtime
+=for Pod::Functions convert UNIX time into record or string using Greenwich time
+
Works just like L</localtime> but the returned values are
localized for the standard Greenwich time zone.
@@ -2687,6 +2907,8 @@ X<goto> X<jump> X<jmp>
=item goto &NAME
+=for Pod::Functions create spaghetti code
+
The C<goto-LABEL> form finds the statement labeled with LABEL and
resumes execution there. It can't be used to get out of a block or
subroutine given to C<sort>. It can be used to go almost anywhere
@@ -2734,6 +2956,8 @@ X<grep>
=item grep EXPR,LIST
+=for Pod::Functions locate elements in a list test true against a given criterion
+
This is similar in spirit to, but not the same as, grep(1) and its
relatives. In particular, it is not limited to using regular expressions.
@@ -2769,6 +2993,8 @@ X<hex> X<hexadecimal>
=item hex
+=for Pod::Functions convert a string to a hexadecimal number
+
Interprets EXPR as a hex string and returns the corresponding value.
(To convert strings that might start with either C<0>, C<0x>, or C<0b>, see
L</oct>.) If EXPR is omitted, uses C<$_>.
@@ -2784,6 +3010,8 @@ L</sprintf>, and L</unpack>.
=item import LIST
X<import>
+=for Pod::Functions patch a module's namespace into your own
+
There is no builtin C<import> function. It is just an ordinary
method (subroutine) defined (or inherited) by modules that wish to export
names to another module. The C<use> function calls the C<import> method
@@ -2794,6 +3022,8 @@ X<index> X<indexOf> X<InStr>
=item index STR,SUBSTR
+=for Pod::Functions find a substring within a string
+
The index function searches for one string within another, but without
the wildcard-like behavior of a full regular-expression pattern match.
It returns the position of the first occurrence of SUBSTR in STR at
@@ -2808,6 +3038,8 @@ X<int> X<integer> X<truncate> X<trunc> X<floor>
=item int
+=for Pod::Functions get the integer portion of a number
+
Returns the integer portion of EXPR. If EXPR is omitted, uses C<$_>.
You should not use this function for rounding: one because it truncates
towards C<0>, and two because machine representations of floating-point
@@ -2820,6 +3052,8 @@ functions will serve you better than will int().
=item ioctl FILEHANDLE,FUNCTION,SCALAR
X<ioctl>
+=for Pod::Functions system-dependent device control system call
+
Implements the ioctl(2) function. You'll probably first have to say
require "sys/ioctl.ph"; # probably in $Config{archlib}/sys/ioctl.ph
@@ -2859,6 +3093,8 @@ Portability issues: L<perlport/ioctl>.
=item join EXPR,LIST
X<join>
+=for Pod::Functions join a list into a string using a separator
+
Joins the separate strings of LIST into a single string with fields
separated by the value of EXPR, and returns that new string. Example:
@@ -2874,6 +3110,8 @@ X<keys> X<key>
=item keys EXPR
+=for Pod::Functions retrieve list of indices from a hash
+
Called in list context, returns a list consisting of all the keys of the
named hash, or in Perl 5.12 or later only, the indices of an array. Perl
releases prior to 5.12 will produce a syntax error if you try to use an
@@ -2954,6 +3192,8 @@ See also C<each>, C<values>, and C<sort>.
=item kill SIGNAL
X<kill> X<signal>
+=for Pod::Functions send a signal to a process or process group
+
Sends a signal to a list of processes. Returns the number of
processes successfully signaled (which is not necessarily the
same as the number actually killed).
@@ -2998,6 +3238,8 @@ X<last> X<break>
=item last
+=for Pod::Functions exit a block prematurely
+
The C<last> command is like the C<break> statement in C (as used in
loops); it immediately exits the loop in question. If the LABEL is
omitted, the command refers to the innermost enclosing loop. The
@@ -3024,6 +3266,8 @@ X<lc> X<lowercase>
=item lc
+=for Pod::Functions return lower-case version of a string
+
Returns a lowercased version of EXPR. This is the internal function
implementing the C<\L> escape in double-quoted strings.
@@ -3094,6 +3338,8 @@ X<lcfirst> X<lowercase>
=item lcfirst
+=for Pod::Functions return a string with just the next letter in lower case
+
Returns the value of EXPR with the first character lowercased. This
is the internal function implementing the C<\l> escape in
double-quoted strings.
@@ -3108,6 +3354,8 @@ X<length> X<size>
=item length
+=for Pod::Functions return the number of bytes in a string
+
Returns the length in I<characters> of the value of EXPR. If EXPR is
omitted, returns the length of C<$_>. If EXPR is undefined, returns
C<undef>.
@@ -3124,11 +3372,15 @@ to C<use Encode> first). See L<Encode> and L<perlunicode>.
=item __LINE__
X<__LINE__>
+=for Pod::Functions the current source line number
+
A special token that compiles to the current line number.
=item link OLDFILE,NEWFILE
X<link>
+=for Pod::Functions create a hard link in the filesystem
+
Creates a new filename linked to the old filename. Returns true for
success, false otherwise.
@@ -3137,6 +3389,8 @@ Portability issues: L<perlport/link>.
=item listen SOCKET,QUEUESIZE
X<listen>
+=for Pod::Functions register your socket as a server
+
Does the same thing that the listen(2) system call does. Returns true if
it succeeded, false otherwise. See the example in
L<perlipc/"Sockets: Client/Server Communication">.
@@ -3144,6 +3398,8 @@ L<perlipc/"Sockets: Client/Server Communication">.
=item local EXPR
X<local>
+=for Pod::Functions create a temporary value for a global variable (dynamic scoping)
+
You really probably want to be using C<my> instead, because C<local> isn't
what most people think of as "local". See
L<perlsub/"Private Variables via my()"> for details.
@@ -3162,6 +3418,8 @@ X<localtime> X<ctime>
=item localtime
+=for Pod::Functions convert UNIX time into record or string using local time
+
Converts a time as returned by the time function to a 9-element list
with the time analyzed for the local time zone. Typically used as
follows:
@@ -3236,6 +3494,8 @@ Portability issues: L<perlport/localtime>.
=item lock THING
X<lock>
+=for Pod::Functions get a thread lock on a variable, subroutine, or method
+
This function places an advisory lock on a shared variable or referenced
object contained in I<THING> until the lock goes out of scope.
@@ -3252,6 +3512,8 @@ X<log> X<logarithm> X<e> X<ln> X<base>
=item log
+=for Pod::Functions retrieve the natural logarithm for a number
+
Returns the natural logarithm (base I<e>) of EXPR. If EXPR is omitted,
returns the log of C<$_>. To get the
log of another base, use basic algebra:
@@ -3274,6 +3536,8 @@ X<lstat>
=item lstat
+=for Pod::Functions stat a symbolic link
+
Does the same thing as the C<stat> function (including setting the
special C<_> filehandle) but stats a symbolic link instead of the file
the symbolic link points to. If symbolic links are unimplemented on
@@ -3286,6 +3550,8 @@ Portability issues: L<perlport/lstat>.
=item m//
+=for Pod::Functions match a string with a regular expression pattern
+
The match operator. See L<perlop/"Regexp Quote-Like Operators">.
=item map BLOCK LIST
@@ -3293,6 +3559,8 @@ X<map>
=item map EXPR,LIST
+=for Pod::Functions apply a change to a list to get back a new list with the changes
+
Evaluates the BLOCK or EXPR for each element of LIST (locally setting
C<$_> to each element) and returns the list value composed of the
results of each such evaluation. In scalar context, returns the
@@ -3374,6 +3642,8 @@ X<mkdir> X<md> X<directory, create>
=item mkdir
+=for Pod::Functions create a directory
+
Creates the directory specified by FILENAME, with permissions
specified by MASK (as modified by C<umask>). If it succeeds it
returns true; otherwise it returns false and sets C<$!> (errno).
@@ -3398,6 +3668,8 @@ the C<mkpath> function of the L<File::Path> module.
=item msgctl ID,CMD,ARG
X<msgctl>
+=for Pod::Functions SysV IPC message control operations
+
Calls the System V IPC function msgctl(2). You'll probably have to say
use IPC::SysV;
@@ -3414,6 +3686,8 @@ Portability issues: L<perlport/msgctl>.
=item msgget KEY,FLAGS
X<msgget>
+=for Pod::Functions get SysV IPC message queue
+
Calls the System V IPC function msgget(2). Returns the message queue
id, or C<undef> on error. See also
L<perlipc/"SysV IPC"> and the documentation for C<IPC::SysV> and
@@ -3424,6 +3698,8 @@ Portability issues: L<perlport/msgget>.
=item msgrcv ID,VAR,SIZE,TYPE,FLAGS
X<msgrcv>
+=for Pod::Functions receive a SysV IPC message from a message queue
+
Calls the System V IPC function msgrcv to receive a message from
message queue ID into variable VAR with a maximum message size of
SIZE. Note that when a message is received, the message type as a
@@ -3438,6 +3714,8 @@ Portability issues: L<perlport/msgrcv>.
=item msgsnd ID,MSG,FLAGS
X<msgsnd>
+=for Pod::Functions send a SysV IPC message to a message queue
+
Calls the System V IPC function msgsnd to send the message MSG to the
message queue ID. MSG must begin with the native long integer message
type, be followed by the length of the actual message, and then finally
@@ -3457,6 +3735,8 @@ X<my>
=item my TYPE EXPR : ATTRS
+=for Pod::Functions declare and assign a local variable (lexical scoping)
+
A C<my> declares the listed variables to be local (lexically) to the
enclosing block, file, or C<eval>. If more than one value is listed,
the list must be placed in parentheses.
@@ -3473,6 +3753,8 @@ X<next> X<continue>
=item next
+=for Pod::Functions iterate a block prematurely
+
The C<next> command is like the C<continue> statement in C; it starts
the next iteration of the loop:
@@ -3507,6 +3789,8 @@ X<unimporting>
=item no VERSION
+=for Pod::Functions unimport some module symbols or semantics at compile time
+
See the C<use> function, of which C<no> is the opposite.
=item oct EXPR
@@ -3514,6 +3798,8 @@ X<oct> X<octal> X<hex> X<hexadecimal> X<binary> X<bin>
=item oct
+=for Pod::Functions convert a string to an octal number
+
Interprets EXPR as an octal string and returns the corresponding
value. (If EXPR happens to start off with C<0x>, interprets it as a
hex string. If EXPR starts off with C<0b>, it is interpreted as a
@@ -3549,6 +3835,8 @@ X<open> X<pipe> X<file, open> X<fopen>
=item open FILEHANDLE
+=for Pod::Functions open a file, pipe, or descriptor
+
Opens the file whose filename is given by EXPR, and associates it with
FILEHANDLE.
@@ -3966,6 +4254,8 @@ Portability issues: L<perlport/open>.
=item opendir DIRHANDLE,EXPR
X<opendir>
+=for Pod::Functions open a directory
+
Opens a directory named EXPR for processing by C<readdir>, C<telldir>,
C<seekdir>, C<rewinddir>, and C<closedir>. Returns true if successful.
DIRHANDLE may be an expression whose value can be used as an indirect
@@ -3981,6 +4271,8 @@ X<ord> X<encoding>
=item ord
+=for Pod::Functions find a character's numeric representation
+
Returns the numeric value of the first character of EXPR.
If EXPR is an empty string, returns 0. If EXPR is omitted, uses C<$_>.
(Note I<character>, not byte.)
@@ -3997,6 +4289,8 @@ X<our> X<global>
=item our TYPE EXPR : ATTRS
+=for Pod::Functions declare and assign a package variable (lexical scoping)
+
C<our> associates a simple name with a package variable in the current
package for use within the current scope. When C<use strict 'vars'> is in
effect, C<our> lets you use declared global variables without qualifying
@@ -4062,6 +4356,8 @@ L<attributes>, and L<Attribute::Handlers>.
=item pack TEMPLATE,LIST
X<pack>
+=for Pod::Functions convert a list into a binary representation
+
Takes a LIST of values and converts it into a string using the rules
given by the TEMPLATE. The resulting string is the concatenation of
the converted values. Typically, each converted value looks
@@ -4691,6 +4987,8 @@ X<package> X<module> X<namespace> X<version>
=item package NAMESPACE VERSION BLOCK
X<package> X<module> X<namespace> X<version>
+=for Pod::Functions declare a separate global namespace
+
Declares the BLOCK or the rest of the compilation unit as being in the
given namespace. The scope of the package declaration is either the
supplied code BLOCK or, in the absence of a BLOCK, from the declaration
@@ -4728,11 +5026,15 @@ and classes. See L<perlsub> for other scoping issues.
=item __PACKAGE__
X<__PACKAGE__>
+=for Pod::Functions the current package
+
A special token that returns the name of the package in which it occurs.
=item pipe READHANDLE,WRITEHANDLE
X<pipe>
+=for Pod::Functions open a pair of connected filehandles
+
Opens a pair of connected pipes like the corresponding system call.
Note that if you set up a loop of piped processes, deadlock can occur
unless you are very careful. In addition, note that Perl's pipes use
@@ -4754,6 +5056,8 @@ X<pop> X<stack>
=item pop
+=for Pod::Functions remove the last element from an array and return it
+
Pops and returns the last value of the array, shortening the array by
one element.
@@ -4778,6 +5082,8 @@ X<pos> X<match, position>
=item pos
+=for Pod::Functions find or set the offset for the last/next m//g search
+
Returns the offset of where the last C<m//g> search left off for the
variable in question (C<$_> is used when the variable is not
specified). Note that 0 is a valid match offset. C<undef> indicates
@@ -4807,6 +5113,8 @@ X<print>
=item print
+=for Pod::Functions output a list to a filehandle
+
Prints a string or a list of strings. Returns true if successful.
FILEHANDLE may be a scalar variable containing the name of or a reference
to the filehandle, thus introducing one level of indirection. (NOTE: If
@@ -4849,6 +5157,8 @@ X<printf>
=item printf
+=for Pod::Functions output a formatted list to a filehandle
+
Equivalent to C<print FILEHANDLE sprintf(FORMAT, LIST)>, except that C<$\>
(the output record separator) is not appended. The first argument of the
list will be interpreted as the C<printf> format. See
@@ -4868,6 +5178,8 @@ error prone.
=item prototype FUNCTION
X<prototype>
+=for Pod::Functions get the prototype (if any) of a subroutine
+
Returns the prototype of a function as a string (or C<undef> if the
function has no prototype). FUNCTION is a reference to, or the name of,
the function whose prototype you want to retrieve.
@@ -4884,6 +5196,8 @@ X<push> X<stack>
=item push EXPR,LIST
+=for Pod::Functions append one or more elements to an array
+
Treats ARRAY as a stack by appending the values of LIST to the end of
ARRAY. The length of ARRAY increases by the length of LIST. Has the same
effect as
@@ -4909,16 +5223,26 @@ a recent vintage:
=item q/STRING/
+=for Pod::Functions singly quote a string
+
=item qq/STRING/
+=for Pod::Functions doubly quote a string
+
=item qw/STRING/
+=for Pod::Functions quote a list of words
+
=item qx/STRING/
+=for Pod::Functions backquote quote a string
+
Generalized quotes. See L<perlop/"Quote-Like Operators">.
=item qr/STRING/
+=for Pod::Functions compile pattern
+
Regexp-like quote. See L<perlop/"Regexp Quote-Like Operators">.
=item quotemeta EXPR
@@ -4926,6 +5250,8 @@ X<quotemeta> X<metacharacter>
=item quotemeta
+=for Pod::Functions quote regular expression magic characters
+
Returns the value of EXPR with all the ASCII non-"word"
characters backslashed. (That is, all ASCII characters not matching
C</[A-Za-z_0-9]/> will be preceded by a backslash in the
@@ -5023,6 +5349,8 @@ X<rand> X<random>
=item rand
+=for Pod::Functions retrieve the next pseudorandom number
+
Returns a random fractional number greater than or equal to C<0> and less
than the value of EXPR. (EXPR should be positive.) If EXPR is
omitted, the value C<1> is used. Currently EXPR with the value C<0> is
@@ -5053,6 +5381,8 @@ X<read> X<file, read>
=item read FILEHANDLE,SCALAR,LENGTH
+=for Pod::Functions fixed-length buffered input from a filehandle
+
Attempts to read LENGTH I<characters> of data into variable SCALAR
from the specified FILEHANDLE. Returns the number of characters
actually read, C<0> at end of file, or undef if there was an error (in
@@ -5082,6 +5412,8 @@ in that case pretty much any characters can be read.
=item readdir DIRHANDLE
X<readdir>
+=for Pod::Functions get a directory from a directory handle
+
Returns the next directory entry for a directory opened by C<opendir>.
If used in list context, returns all the rest of the entries in the
directory. If there are no more entries, returns the undefined value in
@@ -5116,6 +5448,8 @@ recent vintage:
=item readline
X<readline> X<gets> X<fgets>
+=for Pod::Functions fetch a record from a file
+
Reads from the filehandle whose typeglob is contained in EXPR (or from
C<*ARGV> if EXPR is not provided). In scalar context, each call reads and
returns the next line until end-of-file is reached, whereupon the
@@ -5165,6 +5499,8 @@ X<readlink>
=item readlink
+=for Pod::Functions determine where a symbolic link is pointing
+
Returns the value of a symbolic link, if symbolic links are
implemented. If not, raises an exception. If there is a system
error, returns the undefined value and sets C<$!> (errno). If EXPR is
@@ -5177,6 +5513,8 @@ Portability issues: L<perlport/readlink>.
=item readpipe
X<readpipe>
+=for Pod::Functions execute a system command and collect standard output
+
EXPR is executed as a system command.
The collected standard output of the command is returned.
In scalar context, it comes back as a single (potentially
@@ -5190,6 +5528,8 @@ If EXPR is omitted, uses C<$_>.
=item recv SOCKET,SCALAR,LENGTH,FLAGS
X<recv>
+=for Pod::Functions receive a message over a Socket
+
Receives a message on a socket. Attempts to receive LENGTH characters
of data into variable SCALAR from the specified SOCKET filehandle.
SCALAR will be grown or shrunk to the length actually read. Takes the
@@ -5212,6 +5552,8 @@ X<redo>
=item redo
+=for Pod::Functions start this loop iteration over again
+
The C<redo> command restarts the loop block without evaluating the
conditional again. The C<continue> block, if any, is not executed. If
the LABEL is omitted, the command refers to the innermost enclosing
@@ -5251,6 +5593,8 @@ X<ref> X<reference>
=item ref
+=for Pod::Functions find out the type of thing being referenced
+
Returns a non-empty string if EXPR is a reference, the empty
string otherwise. If EXPR
is not specified, C<$_> will be used. The value returned depends on the
@@ -5292,6 +5636,8 @@ See also L<perlref>.
=item rename OLDNAME,NEWNAME
X<rename> X<move> X<mv> X<ren>
+=for Pod::Functions change a filename
+
Changes the name of a file; an existing file NEWNAME will be
clobbered. Returns true for success, false otherwise.
@@ -5314,6 +5660,8 @@ X<require>
=item require
+=for Pod::Functions load in external functions from a library at runtime
+
Demands a version of Perl specified by VERSION, or demands some semantics
specified by EXPR or by C<$_> if EXPR is not supplied.
@@ -5496,6 +5844,8 @@ X<reset>
=item reset
+=for Pod::Functions clear all variables of a given name
+
Generally used in a C<continue> block at the end of a loop to clear
variables and reset C<??> searches so that they work again. The
expression is interpreted as a list of single characters (hyphens
@@ -5520,6 +5870,8 @@ X<return>
=item return
+=for Pod::Functions get out of a function early
+
Returns from a subroutine, C<eval>, or C<do FILE> with the value
given in EXPR. Evaluation of EXPR may be in list, scalar, or void
context, depending on how the return value will be used, and the context
@@ -5534,6 +5886,8 @@ evaluated.)
=item reverse LIST
X<reverse> X<rev> X<invert>
+=for Pod::Functions flip a string or a list
+
In list context, returns a list value consisting of the elements
of LIST in the opposite order. In scalar context, concatenates the
elements of LIST and returns a string value with all characters
@@ -5564,6 +5918,8 @@ on a large hash, such as from a DBM file.
=item rewinddir DIRHANDLE
X<rewinddir>
+=for Pod::Functions reset directory handle
+
Sets the current position to the beginning of the directory for the
C<readdir> routine on DIRHANDLE.
@@ -5574,6 +5930,8 @@ X<rindex>
=item rindex STR,SUBSTR
+=for Pod::Functions right-to-left substring search
+
Works just like index() except that it returns the position of the I<last>
occurrence of SUBSTR in STR. If POSITION is specified, returns the
last occurrence beginning at or before that position.
@@ -5583,6 +5941,8 @@ X<rmdir> X<rd> X<directory, remove>
=item rmdir
+=for Pod::Functions remove a directory
+
Deletes the directory specified by FILENAME if that directory is
empty. If it succeeds it returns true; otherwise it returns false and
sets C<$!> (errno). If FILENAME is omitted, uses C<$_>.
@@ -5592,6 +5952,8 @@ the C<rmtree> function of the L<File::Path> module.
=item s///
+=for Pod::Functions replace a pattern with a string
+
The substitution operator. See L<perlop/"Regexp Quote-Like Operators">.
=item say FILEHANDLE LIST
@@ -5603,6 +5965,8 @@ X<say>
=item say
+=for Pod::Functions output a list to a filehandle, appending a newline
+
Just like C<print>, but implicitly appends a newline. C<say LIST> is
simply an abbreviation for C<{ local $\ = "\n"; print LIST }>. To use
FILEHANDLE without a LIST to print the contents of C<$_> to it, you must
@@ -5616,6 +5980,8 @@ scope.
=item scalar EXPR
X<scalar> X<context>
+=for Pod::Functions force a scalar context
+
Forces EXPR to be interpreted in scalar context and returns the value
of EXPR.
@@ -5646,6 +6012,8 @@ See L<perlop> for more details on unary operators and the comma operator.
=item seek FILEHANDLE,POSITION,WHENCE
X<seek> X<fseek> X<filehandle, position>
+=for Pod::Functions reposition file pointer for random-access I/O
+
Sets FILEHANDLE's position, just like the C<fseek> call of C<stdio>.
FILEHANDLE may be an expression whose value gives the name of the
filehandle. The values for WHENCE are C<0> to set the new position
@@ -5693,6 +6061,8 @@ cantankerous), you might need something like this:
=item seekdir DIRHANDLE,POS
X<seekdir>
+=for Pod::Functions reposition directory pointer
+
Sets the current position for the C<readdir> routine on DIRHANDLE. POS
must be a value returned by C<telldir>. C<seekdir> also has the same caveats
about possible directory compaction as the corresponding system library
@@ -5703,6 +6073,8 @@ X<select> X<filehandle, default>
=item select
+=for Pod::Functions reset default output or do I/O multiplexing
+
Returns the currently selected filehandle. If FILEHANDLE is supplied,
sets the new current default filehandle for output. This has two
effects: first, a C<write> or a C<print> without a filehandle
@@ -5799,6 +6171,8 @@ Portability issues: L<perlport/select>.
=item semctl ID,SEMNUM,CMD,ARG
X<semctl>
+=for Pod::Functions SysV semaphore control operations
+
Calls the System V IPC function semctl(2). You'll probably have to say
use IPC::SysV;
@@ -5817,6 +6191,8 @@ Portability issues: L<perlport/semctl>.
=item semget KEY,NSEMS,FLAGS
X<semget>
+=for Pod::Functions get set of SysV semaphores
+
Calls the System V IPC function semget(2). Returns the semaphore id, or
the undefined value on error. See also
L<perlipc/"SysV IPC">, C<IPC::SysV>, C<IPC::SysV::Semaphore>
@@ -5827,6 +6203,8 @@ Portability issues: L<perlport/semget>.
=item semop KEY,OPSTRING
X<semop>
+=for Pod::Functions SysV semaphore operations
+
Calls the System V IPC function semop(2) for semaphore operations
such as signalling and waiting. OPSTRING must be a packed array of
semop structures. Each semop structure can be generated with
@@ -5849,6 +6227,8 @@ X<send>
=item send SOCKET,MSG,FLAGS
+=for Pod::Functions send a message over a socket
+
Sends a message on a socket. Attempts to send the scalar MSG to the SOCKET
filehandle. Takes the same flags as the system call of the same name. On
unconnected sockets, you must specify a destination to I<send to>, in which
@@ -5867,6 +6247,8 @@ pragma: in that case pretty much any characters can be sent.
=item setpgrp PID,PGRP
X<setpgrp> X<group>
+=for Pod::Functions set the process group of a process
+
Sets the current process group for the specified PID, C<0> for the current
process. Raises an exception when used on a machine that doesn't
implement POSIX setpgid(2) or BSD setpgrp(2). If the arguments are omitted,
@@ -5879,6 +6261,8 @@ Portability issues: L<perlport/setpgrp>.
=item setpriority WHICH,WHO,PRIORITY
X<setpriority> X<priority> X<nice> X<renice>
+=for Pod::Functions set a process's nice value
+
Sets the current priority for a process, a process group, or a user.
(See setpriority(2).) Raises an exception when used on a machine
that doesn't implement setpriority(2).
@@ -5888,6 +6272,8 @@ Portability issues: L<perlport/setpriority>.
=item setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL
X<setsockopt>
+=for Pod::Functions set some socket options
+
Sets the socket option requested. Returns C<undef> on error.
Use integer constants provided by the C<Socket> module for
LEVEL and OPNAME. Values for LEVEL can also be obtained from
@@ -5908,6 +6294,8 @@ X<shift>
=item shift
+=for Pod::Functions remove the first element of an array, and return it
+
Shifts the first value of the array off and returns it, shortening the
array by 1 and moving everything down. If there are no elements in the
array, returns the undefined value. If ARRAY is omitted, shifts the
@@ -5935,6 +6323,8 @@ right end.
=item shmctl ID,CMD,ARG
X<shmctl>
+=for Pod::Functions SysV shared memory operations
+
Calls the System V IPC function shmctl. You'll probably have to say
use IPC::SysV;
@@ -5950,6 +6340,8 @@ Portability issues: L<perlport/shmctl>.
=item shmget KEY,SIZE,FLAGS
X<shmget>
+=for Pod::Functions get SysV shared memory segment identifier
+
Calls the System V IPC function shmget. Returns the shared memory
segment id, or C<undef> on error.
See also L<perlipc/"SysV IPC"> and C<IPC::SysV> documentation.
@@ -5960,8 +6352,12 @@ Portability issues: L<perlport/shmget>.
X<shmread>
X<shmwrite>
+=for Pod::Functions read SysV shared memory
+
=item shmwrite ID,STRING,POS,SIZE
+=for Pod::Functions write SysV shared memory
+
Reads or writes the System V shared memory segment ID starting at
position POS for size SIZE by attaching to it, copying in/out, and
detaching from it. When reading, VAR must be a variable that will
@@ -5976,6 +6372,8 @@ Portability issues: L<perlport/shmread> and L<perlport/shmwrite>.
=item shutdown SOCKET,HOW
X<shutdown>
+=for Pod::Functions close down just half of a socket connection
+
Shuts down a socket connection in the manner indicated by HOW, which
has the same interpretation as in the syscall of the same name.
@@ -5998,6 +6396,8 @@ X<sin> X<sine> X<asin> X<arcsine>
=item sin
+=for Pod::Functions return the sine of a number
+
Returns the sine of EXPR (expressed in radians). If EXPR is omitted,
returns sine of C<$_>.
@@ -6011,6 +6411,8 @@ X<sleep> X<pause>
=item sleep
+=for Pod::Functions block for some number of seconds
+
Causes the script to sleep for (integer) EXPR seconds, or forever if no
argument is given. Returns the integer number of seconds actually slept.
@@ -6043,6 +6445,8 @@ See also the POSIX module's C<pause> function.
=item socket SOCKET,DOMAIN,TYPE,PROTOCOL
X<socket>
+=for Pod::Functions create a socket
+
Opens a socket of the specified kind and attaches it to filehandle
SOCKET. DOMAIN, TYPE, and PROTOCOL are specified the same as for
the syscall of the same name. You should C<use Socket> first
@@ -6056,6 +6460,8 @@ value of $^F. See L<perlvar/$^F>.
=item socketpair SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL
X<socketpair>
+=for Pod::Functions create a pair of sockets
+
Creates an unnamed pair of sockets in the specified domain, of the
specified type. DOMAIN, TYPE, and PROTOCOL are specified the same as
for the syscall of the same name. If unimplemented, raises an exception.
@@ -6086,6 +6492,8 @@ X<sort> X<qsort> X<quicksort> X<mergesort>
=item sort LIST
+=for Pod::Functions sort a list of values
+
In list context, this sorts the LIST and returns the sorted list value.
In scalar context, the behaviour of C<sort()> is undefined.
@@ -6279,6 +6687,8 @@ X<splice>
=item splice ARRAY or EXPR
+=for Pod::Functions add or remove elements anywhere in an array
+
Removes the elements designated by OFFSET and LENGTH from an array, and
replaces them with the elements of LIST, if any. In list context,
returns the elements removed from the array. In scalar context,
@@ -6334,6 +6744,8 @@ X<split>
=item split
+=for Pod::Functions split up a string using a regexp delimiter
+
Splits the string EXPR into a list of strings and returns the
list in list context, or the size of the list in scalar context.
@@ -6483,6 +6895,8 @@ comment):
=item sprintf FORMAT, LIST
X<sprintf>
+=for Pod::Functions formatted print into a string
+
Returns a string formatted by the usual C<printf> conventions of the C
library function C<sprintf>. See below for more details
and see L<sprintf(3)> or L<printf(3)> on your system for an explanation of
@@ -6825,6 +7239,8 @@ X<sqrt> X<root> X<square root>
=item sqrt
+=for Pod::Functions square root function
+
Return the positive square root of EXPR. If EXPR is omitted, uses
C<$_>. Works only for non-negative operands unless you've
loaded the C<Math::Complex> module.
@@ -6837,6 +7253,8 @@ X<srand> X<seed> X<randseed>
=item srand
+=for Pod::Functions seed the random number generator
+
Sets and returns the random number seed for the C<rand> operator.
The point of the function is to "seed" the C<rand> function so that C<rand>
@@ -6907,6 +7325,8 @@ X<stat> X<file, status> X<ctime>
=item stat
+=for Pod::Functions get a file's status information
+
Returns a 13-element list giving the status info for a file, either
the file opened via FILEHANDLE or DIRHANDLE, or named by EXPR. If EXPR is
omitted, it stats C<$_> (not C<_>!). Returns the empty list if C<stat> fails. Typically
@@ -7045,6 +7465,8 @@ X<state>
=item state TYPE EXPR : ATTRS
+=for Pod::Functions declare and assign a persistent lexical variable
+
C<state> declares a lexically scoped variable, just like C<my>.
However, those variables will never be reinitialized, contrary to
lexical variables that are reinitialized each time their enclosing block
@@ -7060,6 +7482,8 @@ X<study>
=item study
+=for Pod::Functions optimize input data for repeated searches
+
Takes extra time to study SCALAR (C<$_> if unspecified) in anticipation of
doing many pattern matches on the string before it is next modified.
This may or may not save time, depending on the nature and number of
@@ -7123,6 +7547,8 @@ X<sub>
=item sub NAME (PROTO) : ATTRS BLOCK
+=for Pod::Functions declare a subroutine, possibly anonymously
+
This is subroutine definition, not a real function I<per se>. Without a
BLOCK it's just a forward declaration. Without a NAME, it's an anonymous
function declaration, so does return a value: the CODE ref of the closure
@@ -7135,6 +7561,8 @@ information about attributes.
=item __SUB__
X<__SUB__>
+=for Pod::Functions the current subroutine, or C<undef> if not in a subroutine
+
A special token that returns the a reference to the current subroutine, or
C<undef> outside of a subroutine.
@@ -7148,6 +7576,8 @@ X<substr> X<substring> X<mid> X<left> X<right>
=item substr EXPR,OFFSET
+=for Pod::Functions get or alter a portion of a string
+
Extracts a substring out of EXPR and returns it. First character is at
offset zero. If OFFSET is negative, starts
that far back from the end of the string. If LENGTH is omitted, returns
@@ -7218,6 +7648,8 @@ unspecified.
=item symlink OLDFILE,NEWFILE
X<symlink> X<link> X<symbolic link> X<link, symbolic>
+=for Pod::Functions create a symbolic link to a file
+
Creates a new filename symbolically linked to the old filename.
Returns C<1> for success, C<0> otherwise. On systems that don't support
symbolic links, raises an exception. To check for that,
@@ -7230,6 +7662,8 @@ Portability issues: L<perlport/symlink>.
=item syscall NUMBER, LIST
X<syscall> X<system call>
+=for Pod::Functions execute an arbitrary system call
+
Calls the system call specified as the first element of the list,
passing the remaining elements as arguments to the system call. If
unimplemented, raises an exception. The arguments are interpreted
@@ -7269,6 +7703,8 @@ X<sysopen>
=item sysopen FILEHANDLE,FILENAME,MODE,PERMS
+=for Pod::Functions open a file, pipe, or descriptor
+
Opens the file whose filename is given by FILENAME, and associates it with
FILEHANDLE. If FILEHANDLE is an expression, its value is used as the real
filehandle wanted; an undefined scalar will be suitably autovivified. This
@@ -7334,6 +7770,8 @@ X<sysread>
=item sysread FILEHANDLE,SCALAR,LENGTH
+=for Pod::Functions fixed-length unbuffered input from a filehandle
+
Attempts to read LENGTH bytes of data into variable SCALAR from the
specified FILEHANDLE, using the read(2). It bypasses
buffered IO, so mixing this with other kinds of reads, C<print>,
@@ -7364,6 +7802,8 @@ See L</binmode>, L</open>, and the C<open> pragma, L<open>.
=item sysseek FILEHANDLE,POSITION,WHENCE
X<sysseek> X<lseek>
+=for Pod::Functions position I/O pointer on handle used with sysread and syswrite
+
Sets FILEHANDLE's system position in bytes using lseek(2). FILEHANDLE may
be an expression whose value gives the name of the filehandle. The values
for WHENCE are C<0> to set the new position to POSITION; C<1> to set the it
@@ -7397,6 +7837,8 @@ X<system> X<shell>
=item system PROGRAM LIST
+=for Pod::Functions run a separate program
+
Does exactly the same thing as C<exec LIST>, except that a fork is
done first and the parent process waits for the child process to
exit. Note that argument processing varies depending on the
@@ -7473,6 +7915,8 @@ X<syswrite>
=item syswrite FILEHANDLE,SCALAR
+=for Pod::Functions fixed-length unbuffered output to a filehandle
+
Attempts to write LENGTH bytes of data from variable SCALAR to the
specified FILEHANDLE, using write(2). If LENGTH is
not specified, writes whole SCALAR. It bypasses buffered IO, so
@@ -7502,6 +7946,8 @@ X<tell>
=item tell
+=for Pod::Functions get current seekpointer on a filehandle
+
Returns the current position I<in bytes> for FILEHANDLE, or -1 on
error. FILEHANDLE may be an expression whose value gives the name of
the actual filehandle. If FILEHANDLE is omitted, assumes the file
@@ -7525,6 +7971,8 @@ Those functions ignore the buffering, while tell() does not.
=item telldir DIRHANDLE
X<telldir>
+=for Pod::Functions get current seekpointer on a directory handle
+
Returns the current position of the C<readdir> routines on DIRHANDLE.
Value may be given to C<seekdir> to access a particular location in a
directory. C<telldir> has the same caveats about possible directory
@@ -7533,6 +7981,8 @@ compaction as the corresponding system library routine.
=item tie VARIABLE,CLASSNAME,LIST
X<tie>
+=for Pod::Functions bind a variable to an object class
+
This function binds a variable to a package class that will provide the
implementation for the variable. VARIABLE is the name of the variable
to be enchanted. CLASSNAME is the name of a class implementing objects
@@ -7625,6 +8075,8 @@ For further details see L<perltie>, L<"tied VARIABLE">.
=item tied VARIABLE
X<tied>
+=for Pod::Functions get a reference to the object underlying a tied variable
+
Returns a reference to the object underlying VARIABLE (the same value
that was originally returned by the C<tie> call that bound the variable
to a package.) Returns the undefined value if VARIABLE isn't tied to a
@@ -7633,6 +8085,8 @@ package.
=item time
X<time> X<epoch>
+=for Pod::Functions return number of seconds since 1970
+
Returns the number of non-leap seconds since whatever time the system
considers to be the epoch, suitable for feeding to C<gmtime> and
C<localtime>. On most systems the epoch is 00:00:00 UTC, January 1, 1970;
@@ -7651,6 +8105,8 @@ L<DateTime> module.
=item times
X<times>
+=for Pod::Functions return elapsed time for self and child processes
+
Returns a four-element list giving the user and system times in
seconds for this process and any exited children of this process.
@@ -7664,6 +8120,8 @@ Portability issues: L<perlport/times>.
=item tr///
+=for Pod::Functions transliterate a string
+
The transliteration operator. Same as C<y///>. See
L<perlop/"Quote and Quote-like Operators">.
@@ -7672,6 +8130,8 @@ X<truncate>
=item truncate EXPR,LENGTH
+=for Pod::Functions shorten a file
+
Truncates the file opened on FILEHANDLE, or named by EXPR, to the
specified length. Raises an exception if truncate isn't implemented
on your system. Returns true if successful, C<undef> on error.
@@ -7689,6 +8149,8 @@ X<uc> X<uppercase> X<toupper>
=item uc
+=for Pod::Functions return upper-case version of a string
+
Returns an uppercased version of EXPR. This is the internal function
implementing the C<\U> escape in double-quoted strings.
It does not attempt to do titlecase mapping on initial letters. See
@@ -7704,6 +8166,8 @@ X<ucfirst> X<uppercase>
=item ucfirst
+=for Pod::Functions return a string with just the next letter in upper case
+
Returns the value of EXPR with the first character in uppercase
(titlecase in Unicode). This is the internal function implementing
the C<\u> escape in double-quoted strings.
@@ -7718,6 +8182,8 @@ X<umask>
=item umask
+=for Pod::Functions set file creation mode mask
+
Sets the umask for the process to EXPR and returns the previous value.
If EXPR is omitted, merely returns the current umask.
@@ -7758,6 +8224,8 @@ X<undef> X<undefine>
=item undef
+=for Pod::Functions remove a variable or function definition
+
Undefines the value of EXPR, which must be an lvalue. Use only on a
scalar value, an array (using C<@>), a hash (using C<%>), a subroutine
(using C<&>), or a typeglob (using C<*>). Saying C<undef $hash{$key}>
@@ -7785,6 +8253,8 @@ X<unlink> X<delete> X<remove> X<rm> X<del>
=item unlink
+=for Pod::Functions remove one link to a file
+
Deletes a list of files. On success, it returns the number of files
it successfully deleted. On failure, it returns false and sets C<$!>
(errno):
@@ -7814,6 +8284,8 @@ X<unpack>
=item unpack TEMPLATE
+=for Pod::Functions convert binary structure into normal perl variables
+
C<unpack> does the reverse of C<pack>: it takes a string
and expands it out into a list of values.
(In scalar context, it returns merely the first value produced.)
@@ -7876,6 +8348,8 @@ X<unshift>
=item unshift EXPR,LIST
+=for Pod::Functions prepend more elements to the beginning of a list
+
Does the opposite of a C<shift>. Or the opposite of a C<push>,
depending on how you look at it. Prepends list to the front of the
array and returns the new number of elements in the array.
@@ -7901,6 +8375,8 @@ a recent vintage:
=item untie VARIABLE
X<untie>
+=for Pod::Functions break a tie binding to a variable
+
Breaks the binding between a variable and a package.
(See L<tie|/tie VARIABLE,CLASSNAME,LIST>.)
Has no effect if the variable is not tied.
@@ -7916,6 +8392,8 @@ X<use> X<module> X<import>
=item use VERSION
+=for Pod::Functions load in a module at compile time and import its namespace
+
Imports some semantics into the current package from the named module,
generally by aliasing certain subroutine or variable names into your
package. It is exactly equivalent to
@@ -8034,6 +8512,8 @@ functionality from the command-line.
=item utime LIST
X<utime>
+=for Pod::Functions set a file's last access and modify times
+
Changes the access and modification times on each file of a list of
files. The first two elements of the list must be the NUMERIC access
and modification times, in that order. Returns the number of files
@@ -8083,6 +8563,8 @@ X<values>
=item values EXPR
+=for Pod::Functions return a list of the values in a hash
+
In list context, returns a list consisting of all the values of the named
hash. In Perl 5.12 or later only, will also return a list of the values of
an array; prior to that release, attempting to use an array argument will
@@ -8130,6 +8612,8 @@ See also C<keys>, C<each>, and C<sort>.
=item vec EXPR,OFFSET,BITS
X<vec> X<bit> X<bit vector>
+=for Pod::Functions test or set particular bits in a string
+
Treats the string in EXPR as a bit vector made up of elements of
width BITS and returns the value of the element specified by OFFSET
as an unsigned integer. BITS therefore specifies the number of bits
@@ -8368,6 +8852,8 @@ example above should print the following table:
=item wait
X<wait>
+=for Pod::Functions wait for any child process to die
+
Behaves like wait(2) on your system: it waits for a child
process to terminate and returns the pid of the deceased process, or
C<-1> if there are no child processes. The status is returned in C<$?>
@@ -8383,6 +8869,8 @@ Portability issues: L<perlport/wait>.
=item waitpid PID,FLAGS
X<waitpid>
+=for Pod::Functions wait for a particular child process to die
+
Waits for a particular child process to terminate and returns the pid of
the deceased process, or C<-1> if there is no such child process. On some
systems, a value of 0 indicates that there are processes still running.
@@ -8410,6 +8898,8 @@ Portability issues: L<perlport/waitpid>.
=item wantarray
X<wantarray> X<context>
+=for Pod::Functions get void vs scalar vs list context of current subroutine call
+
Returns true if the context of the currently executing subroutine or
C<eval> is looking for a list value. Returns false if the context is
looking for a scalar. Returns the undefined value if the context is
@@ -8428,6 +8918,8 @@ This function should have been named wantlist() instead.
=item warn LIST
X<warn> X<warning> X<STDERR>
+=for Pod::Functions print debugging info
+
Prints the value of LIST to STDERR. If the last element of LIST does
not end in a newline, it appends the same file/line number text as C<die>
does.
@@ -8475,6 +8967,8 @@ X<when>
=item when BLOCK
+=for Pod::Functions !RT #108848
+
C<when> is analogous to the C<case>
keyword in other languages. Used with a
C<foreach> loop or the experimental C<given> block, C<when> can be used in
@@ -8525,6 +9019,8 @@ X<write>
=item write
+=for Pod::Functions print a picture record
+
Writes a formatted record (possibly multi-line) to the specified FILEHANDLE,
using the format associated with that file. By default the format for
a file is the one having the same name as the filehandle, but the
@@ -8551,6 +9047,8 @@ Note that write is I<not> the opposite of C<read>. Unfortunately.
=item y///
+=for Pod::Functions transliterate a string
+
The transliteration operator. Same as C<tr///>. See
L<perlop/"Quote and Quote-like Operators">.