/usr/share/perl5/pod
NameSizeModeActions
perl.pod162700644editdlrm
perl56delta.pod1072010644editdlrm
perl58delta.pod1151650644editdlrm
perl561delta.pod1247130644editdlrm
perl581delta.pod380610644editdlrm
perl582delta.pod44700644editdlrm
perl583delta.pod63350644editdlrm
perl584delta.pod73630644editdlrm
perl585delta.pod58890644editdlrm
perl586delta.pod46510644editdlrm
perl587delta.pod83570644editdlrm
perl588delta.pod252720644editdlrm
perl589delta.pod539000644editdlrm
perl5004delta.pod562400644editdlrm
perl5005delta.pod342830644editdlrm
perl5100delta.pod555350644editdlrm
perl5101delta.pod438880644editdlrm
perl5120delta.pod892720644editdlrm
perl5121delta.pod101410644editdlrm
perl5122delta.pod96030644editdlrm
perl5123delta.pod41000644editdlrm
perl5124delta.pod36720644editdlrm
perl5125delta.pod76830644editdlrm
perl5140delta.pod1443240644editdlrm
perl5141delta.pod79660644editdlrm
perl5142delta.pod68920644editdlrm
perl5143delta.pod77600644editdlrm
perl5144delta.pod63270644editdlrm
perl5160delta.pod1336510644editdlrm
perl5161delta.pod61420644editdlrm
perl5162delta.pod35940644editdlrm
perl5163delta.pod40850644editdlrm
perl5180delta.pod1194310644editdlrm
perl5181delta.pod65950644editdlrm
perl5182delta.pod53350644editdlrm
perl5184delta.pod46420644editdlrm
perl5200delta.pod1156990644editdlrm
perl5201delta.pod108990644editdlrm
perl5202delta.pod125090644editdlrm
perl5203delta.pod93920644editdlrm
perl5220delta.pod1309630644editdlrm
perl5221delta.pod107670644editdlrm
perl5222delta.pod126290644editdlrm
perl5223delta.pod84560644editdlrm
perl5224delta.pod44600644editdlrm
perl5240delta.pod649270644editdlrm
perl5241delta.pod82150644editdlrm
perl5242delta.pod41130644editdlrm
perl5243delta.pod114280644editdlrm
perl5244delta.pod45100644editdlrm
perl5260delta.pod1018360644editdlrm
perl5261delta.pod79270644editdlrm
perl5262delta.pod78800644editdlrm
perl5263delta.pod70630644editdlrm
perl5280delta.pod721130644editdlrm
perlaix.pod204370644editdlrm
perlamiga.pod57490644editdlrm
perlandroid.pod78710644editdlrm
perlapi.pod4435350644editdlrm
perlapio.pod192850644editdlrm
perlartistic.pod70100644editdlrm
perlbook.pod83380644editdlrm
perlboot.pod2940644editdlrm
perlbot.pod3040644editdlrm
perlbs2000.pod80580644editdlrm
perlcall.pod567060644editdlrm
perlce.pod146020644editdlrm
perlcheat.pod44810644editdlrm
perlclib.pod96190644editdlrm
perlcn.pod46910644editdlrm
perlcommunity.pod72170644editdlrm
perlcygwin.pod271990644editdlrm
perldata.pod467430644editdlrm
perldbmfilter.pod49810644editdlrm
perldebguts.pod385350644editdlrm
perldebtut.pod221520644editdlrm
perldebug.pod392580644editdlrm
perldelta.pod70630644editdlrm
perldeprecation.pod181690644editdlrm
perldiag.pod2845720644editdlrm
perldos.pod105220644editdlrm
perldsc.pod256140644editdlrm
perldtrace.pod79580644editdlrm
perlebcdic.pod842330644editdlrm
perlembed.pod371960644editdlrm
perlexperiment.pod71950644editdlrm
perlfork.pod133550644editdlrm
perlform.pod166080644editdlrm
perlfreebsd.pod16100644editdlrm
perlfunc.pod3929570644editdlrm
perlgit.pod335090644editdlrm
perlgpl.pod138150644editdlrm
perlguts.pod1393290644editdlrm
perlhack.pod404450644editdlrm
perlhacktips.pod555090644editdlrm
perlhacktut.pod61530644editdlrm
perlhaiku.pod15080644editdlrm
perlhist.pod535460644editdlrm
perlhpux.pod305090644editdlrm
perlhurd.pod19930644editdlrm
perlintern.pod545720644editdlrm
perlinterp.pod336870644editdlrm
perlintro.pod221190644editdlrm
perliol.pod341850644editdlrm
perlipc.pod708290644editdlrm
perlirix.pod43950644editdlrm
perljp.pod75210644editdlrm
perlko.pod122590644editdlrm
perllexwarn.pod3550644editdlrm
perllinux.pod14880644editdlrm
perllocale.pod686780644editdlrm
perllol.pod95800644editdlrm
perlmacos.pod10010644editdlrm
perlmacosx.pod120600644editdlrm
perlmod.pod262500644editdlrm
perlmodinstall.pod127920644editdlrm
perlmodlib.pod764820644editdlrm
perlmodstyle.pod225750644editdlrm
perlmroapi.pod32120644editdlrm
perlnetware.pod66480644editdlrm
perlnewmod.pod110360644editdlrm
perlnumber.pod83530644editdlrm
perlobj.pod355370644editdlrm
perlootut.pod267830644editdlrm
perlop.pod1362520644editdlrm
perlopenbsd.pod12040644editdlrm
perlopentut.pod94550644editdlrm
perlos2.pod933510644editdlrm
perlos390.pod156740644editdlrm
perlos400.pod47680644editdlrm
perlpacktut.pod512820644editdlrm
perlperf.pod498810644editdlrm
perlplan9.pod51250644editdlrm
perlpod.pod221960644editdlrm
perlpodspec.pod684760644editdlrm
perlpolicy.pod256290644editdlrm
perlport.pod876020644editdlrm
perlpragma.pod51760644editdlrm
perlqnx.pod66730644editdlrm
perlre.pod1209010644editdlrm
perlreapi.pod303340644editdlrm
perlrebackslash.pod318170644editdlrm
perlrecharclass.pod490290644editdlrm
perlref.pod353040644editdlrm
perlreftut.pod187900644editdlrm
perlreguts.pod383280644editdlrm
perlrepository.pod5090644editdlrm
perlrequick.pod184970644editdlrm
perlreref.pod147440644editdlrm
perlretut.pod1212570644editdlrm
perlriscos.pod15290644editdlrm
perlrun.pod535500644editdlrm
perlsec.pod261840644editdlrm
perlsolaris.pod298220644editdlrm
perlsource.pod68760644editdlrm
perlstyle.pod86300644editdlrm
perlsub.pod729670644editdlrm
perlsymbian.pod153590644editdlrm
perlsyn.pod445120644editdlrm
perlsynology.pod77780644editdlrm
perlthrtut.pod464590644editdlrm
perltie.pod386070644editdlrm
perltoc.pod6941710644editdlrm
perltodo.pod3760644editdlrm
perltooc.pod2940644editdlrm
perltoot.pod2940644editdlrm
perltrap.pod106200644editdlrm
perltru64.pod84920644editdlrm
perltw.pod44770644editdlrm
perlunicode.pod824910644editdlrm
perlunicook.pod254880644editdlrm
perlunifaq.pod136470644editdlrm
perluniintro.pod383400644editdlrm
perluniprops.pod2853060644editdlrm
perlunitut.pod79510644editdlrm
perlutil.pod76400644editdlrm
perlvar.pod783640644editdlrm
perlvms.pod508230644editdlrm
perlvos.pod38430644editdlrm
perlwin32.pod392980644editdlrm
perlxs.pod789200644editdlrm
perlxstut.pod500950644editdlrm
perlxstypemap.pod240010644editdlrm
Edit: /usr/share/perl5/pod/perlfunc.pod (392957B)
=head1 NAME X perlfunc - Perl builtin functions =head1 DESCRIPTION The functions in this section can serve as terms in an expression. They fall into two major categories: list operators and named unary operators. These differ in their precedence relationship with a following comma. (See the precedence table in L.) List operators take more than one argument, while unary operators can never take more than one argument. Thus, a comma terminates the argument of a unary operator, but merely separates the arguments of a list operator. A unary operator generally provides scalar context to its argument, while a list operator may provide either scalar or list contexts for its arguments. If it does both, scalar arguments come first and list argument follow, and there can only ever be one such list argument. For instance, L|/splice ARRAY,OFFSET,LENGTH,LIST> has three scalar arguments followed by a list, whereas L|/gethostbyname NAME> has four scalar arguments. In the syntax descriptions that follow, list operators that expect a list (and provide list context for elements of the list) are shown with LIST as an argument. Such a list may consist of any combination of scalar arguments or list values; the list values will be included in the list as if each individual element were interpolated at that point in the list, forming a longer single-dimensional list value. Commas should separate literal elements of the LIST. Any function in the list below may be used either with or without parentheses around its arguments. (The syntax descriptions omit the parentheses.) If you use parentheses, the simple but occasionally surprising rule is this: It I like a function, therefore it I a function, and precedence doesn't matter. Otherwise it's a list operator or unary operator, and precedence does matter. Whitespace between the function and left parenthesis doesn't count, so sometimes you need to be careful: print 1+2+4; # Prints 7. print(1+2) + 4; # Prints 3. print (1+2)+4; # Also prints 3! print +(1+2)+4; # Prints 7. print ((1+2)+4); # Prints 7. If you run Perl with the L|warnings> pragma, it can warn you about this. For example, the third line above produces: print (...) interpreted as function at - line 1. Useless use of integer addition in void context at - line 1. A few functions take no arguments at all, and therefore work as neither unary nor list operators. These include such functions as L|/time> and L|/endpwent>. For example, C always means C. For functions that can be used in either a scalar or list context, nonabortive failure is generally indicated in scalar context by returning the undefined value, and in list context by returning the empty list. Remember the following important rule: There is B that relates the behavior of an expression in list context to its behavior in scalar context, or vice versa. It might do two totally different things. Each operator and function decides which sort of value would be most appropriate to return in scalar context. Some operators return the length of the list that would have been returned in list context. Some operators return the first value in the list. Some operators return the last value in the list. Some operators return a count of successful operations. In general, they do what you want, unless you want consistency. X A named array in scalar context is quite different from what would at first glance appear to be a list in scalar context. You can't get a list like C<(1,2,3)> into being in scalar context, because the compiler knows the context at compile time. It would generate the scalar comma operator there, not the list concatenation version of the comma. That means it was never a list to start with. In general, functions in Perl that serve as wrappers for system calls ("syscalls") of the same name (like L, L, L, etc.) return true when they succeed and L|/undef EXPR> otherwise, as is usually mentioned in the descriptions below. This is different from the C interfaces, which return C<-1> on failure. Exceptions to this rule include L|/wait>, L|/waitpid PID,FLAGS>, and L|/syscall NUMBER, LIST>. System calls also set the special L|perlvar/$!> variable on failure. Other functions do not, except accidentally. Extension modules can also hook into the Perl parser to define new kinds of keyword-headed expression. These may look like functions, but may also look completely different. The syntax following the keyword is defined entirely by the extension. If you are an implementor, see L for the mechanism. If you are using such a module, see the module's documentation for details of the syntax that it defines. =head2 Perl Functions by Category X Here are Perl's functions (including things that look like functions, like some keywords and named operators) arranged by category. Some functions appear in more than one place. =over 4 =item Functions for SCALARs or strings X X X =for Pod::Functions =String L|/chomp VARIABLE>, L|/chop VARIABLE>, L|/chr NUMBER>, L|/crypt PLAINTEXT,SALT>, L|/fc EXPR>, L|/hex EXPR>, L|/index STR,SUBSTR,POSITION>, L|/lc EXPR>, L|/lcfirst EXPR>, L|/length EXPR>, L|/oct EXPR>, L|/ord EXPR>, L|/pack TEMPLATE,LIST>, LE>|/qESTRINGE>, LE>|/qqESTRINGE>, L|/reverse LIST>, L|/rindex STR,SUBSTR,POSITION>, L|/sprintf FORMAT, LIST>, L|/substr EXPR,OFFSET,LENGTH,REPLACEMENT>, LEE>|/trEEE>, L|/uc EXPR>, L|/ucfirst EXPR>, LEE>|/yEEE> L|/fc EXPR> is available only if the L feature|feature/The 'fc' feature> is enabled or if it is prefixed with C. The L feature|feature/The 'fc' feature> is enabled automatically with a C (or higher) declaration in the current scope. =item Regular expressions and pattern matching X X X =for Pod::Functions =Regexp LE>|/mEE>, L|/pos SCALAR>, LE>|/qrESTRINGE>, L|/quotemeta EXPR>, LEE>|/sEEE>, L|/split EPATTERNE,EXPR,LIMIT>, L|/study SCALAR> =item Numeric functions X X X X =for Pod::Functions =Math L|/abs VALUE>, L|/atan2 Y,X>, L|/cos EXPR>, L|/exp EXPR>, L|/hex EXPR>, L|/int EXPR>, L|/log EXPR>, L|/oct EXPR>, L|/rand EXPR>, L|/sin EXPR>, L|/sqrt EXPR>, L|/srand EXPR> =item Functions for real @ARRAYs X =for Pod::Functions =ARRAY L|/each HASH>, L|/keys HASH>, L|/pop ARRAY>, L|/push ARRAY,LIST>, L|/shift ARRAY>, L|/splice ARRAY,OFFSET,LENGTH,LIST>, L|/unshift ARRAY,LIST>, L|/values HASH> =item Functions for list data X =for Pod::Functions =LIST L|/grep BLOCK LIST>, L|/join EXPR,LIST>, L|/map BLOCK LIST>, LE>|/qwESTRINGE>, L|/reverse LIST>, L|/sort SUBNAME LIST>, L|/unpack TEMPLATE,EXPR> =item Functions for real %HASHes X =for Pod::Functions =HASH L|/delete EXPR>, L|/each HASH>, L|/exists EXPR>, L|/keys HASH>, L|/values HASH> =item Input and output functions X X X X =for Pod::Functions =I/O L|/binmode FILEHANDLE, LAYER>, L|/close FILEHANDLE>, L|/closedir DIRHANDLE>, L|/dbmclose HASH>, L|/dbmopen HASH,DBNAME,MASK>, L|/die LIST>, L|/eof FILEHANDLE>, L|/fileno FILEHANDLE>, L|/flock FILEHANDLE,OPERATION>, L|/format>, L|/getc FILEHANDLE>, L|/print FILEHANDLE LIST>, L|/printf FILEHANDLE FORMAT, LIST>, L|/read FILEHANDLE,SCALAR,LENGTH,OFFSET>, L|/readdir DIRHANDLE>, L|/readline EXPR>, L|/rewinddir DIRHANDLE>, L|/say FILEHANDLE LIST>, L|/seek FILEHANDLE,POSITION,WHENCE>, L|/seekdir DIRHANDLE,POS>, L|/select RBITS,WBITS,EBITS,TIMEOUT>, L|/syscall NUMBER, LIST>, L|/sysread FILEHANDLE,SCALAR,LENGTH,OFFSET>, L|/sysseek FILEHANDLE,POSITION,WHENCE>, L|/syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET>, L|/tell FILEHANDLE>, L|/telldir DIRHANDLE>, L|/truncate FILEHANDLE,LENGTH>, L|/warn LIST>, L|/write FILEHANDLE> L|/say FILEHANDLE LIST> is available only if the L feature|feature/The 'say' feature> is enabled or if it is prefixed with C. The L feature|feature/The 'say' feature> is enabled automatically with a C (or higher) declaration in the current scope. =item Functions for fixed-length data or records =for Pod::Functions =Binary L|/pack TEMPLATE,LIST>, L|/read FILEHANDLE,SCALAR,LENGTH,OFFSET>, L|/syscall NUMBER, LIST>, L|/sysread FILEHANDLE,SCALAR,LENGTH,OFFSET>, L|/sysseek FILEHANDLE,POSITION,WHENCE>, L|/syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET>, L|/unpack TEMPLATE,EXPR>, L|/vec EXPR,OFFSET,BITS> =item Functions for filehandles, files, or directories X X X X X X =for Pod::Functions =File L>|/-X FILEHANDLE>, L|/chdir EXPR>, L|/chmod LIST>, L|/chown LIST>, L|/chroot FILENAME>, L|/fcntl FILEHANDLE,FUNCTION,SCALAR>, L|/glob EXPR>, L|/ioctl FILEHANDLE,FUNCTION,SCALAR>, L|/link OLDFILE,NEWFILE>, L|/lstat FILEHANDLE>, L|/mkdir FILENAME,MASK>, L|/open FILEHANDLE,EXPR>, L|/opendir DIRHANDLE,EXPR>, L|/readlink EXPR>, L|/rename OLDNAME,NEWNAME>, L|/rmdir FILENAME>, L|/select FILEHANDLE>, L|/stat FILEHANDLE>, L|/symlink OLDFILE,NEWFILE>, L|/sysopen FILEHANDLE,FILENAME,MODE>, L|/umask EXPR>, L|/unlink LIST>, L|/utime LIST> =item Keywords related to the control flow of your Perl program X =for Pod::Functions =Flow L|/break>, L|/caller EXPR>, L|/continue BLOCK>, L|/die LIST>, L|/do BLOCK>, L|/dump LABEL>, L|/eval EXPR>, L|/evalbytes EXPR>, L|/exit EXPR>, L|/__FILE__>, L|/goto LABEL>, L|/last LABEL>, L|/__LINE__>, L|/next LABEL>, L|/__PACKAGE__>, L|/redo LABEL>, L|/return EXPR>, L|/sub NAME BLOCK>, L|/__SUB__>, L|/wantarray> L|/break> is available only if you enable the experimental L feature|feature/The 'switch' feature> or use the C prefix. The L feature|feature/The 'switch' feature> also enables the C, C and C statements, which are documented in L. The L feature|feature/The 'switch' feature> is enabled automatically with a C (or higher) declaration in the current scope. In Perl v5.14 and earlier, L|/continue BLOCK> required the L feature|feature/The 'switch' feature>, like the other keywords. L|/evalbytes EXPR> is only available with the L feature|feature/The 'unicode_eval' and 'evalbytes' features> (see L) or if prefixed with C. L|/__SUB__> is only available with the L feature|feature/The 'current_sub' feature> or if prefixed with C. Both the L|feature/The 'unicode_eval' and 'evalbytes' features> and L|feature/The 'current_sub' feature> features are enabled automatically with a C (or higher) declaration in the current scope. =item Keywords related to scoping =for Pod::Functions =Namespace L|/caller EXPR>, L|/import LIST>, L|/local EXPR>, L|/my VARLIST>, L|/our VARLIST>, L|/package NAMESPACE>, L|/state VARLIST>, L|/use Module VERSION LIST> L|/state VARLIST> is available only if the L feature|feature/The 'state' feature> is enabled or if it is prefixed with C. The L feature|feature/The 'state' feature> is enabled automatically with a C (or higher) declaration in the current scope. =item Miscellaneous functions =for Pod::Functions =Misc L|/defined EXPR>, L|/formline PICTURE,LIST>, L|/lock THING>, L|/prototype FUNCTION>, L|/reset EXPR>, L|/scalar EXPR>, L|/undef EXPR> =item Functions for processes and process groups X X X =for Pod::Functions =Process L|/alarm SECONDS>, L|/exec LIST>, L|/fork>, L|/getpgrp PID>, L|/getppid>, L|/getpriority WHICH,WHO>, L|/kill SIGNAL, LIST>, L|/pipe READHANDLE,WRITEHANDLE>, LE>|/qxESTRINGE>, L|/readpipe EXPR>, L|/setpgrp PID,PGRP>, L|/setpriority WHICH,WHO,PRIORITY>, L|/sleep EXPR>, L|/system LIST>, L|/times>, L|/wait>, L|/waitpid PID,FLAGS> =item Keywords related to Perl modules X =for Pod::Functions =Modules L|/do EXPR>, L|/import LIST>, L|/no MODULE VERSION LIST>, L|/package NAMESPACE>, L|/require VERSION>, L|/use Module VERSION LIST> =item Keywords related to classes and object-orientation X X X =for Pod::Functions =Objects L|/bless REF,CLASSNAME>, L|/dbmclose HASH>, L|/dbmopen HASH,DBNAME,MASK>, L|/package NAMESPACE>, L|/ref EXPR>, L|/tie VARIABLE,CLASSNAME,LIST>, L|/tied VARIABLE>, L|/untie VARIABLE>, L|/use Module VERSION LIST> =item Low-level socket functions X X =for Pod::Functions =Socket L|/accept NEWSOCKET,GENERICSOCKET>, L|/bind SOCKET,NAME>, L|/connect SOCKET,NAME>, L|/getpeername SOCKET>, L|/getsockname SOCKET>, L|/getsockopt SOCKET,LEVEL,OPTNAME>, L|/listen SOCKET,QUEUESIZE>, L|/recv SOCKET,SCALAR,LENGTH,FLAGS>, L|/send SOCKET,MSG,FLAGS,TO>, L|/setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL>, L|/shutdown SOCKET,HOW>, L|/socket SOCKET,DOMAIN,TYPE,PROTOCOL>, L|/socketpair SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL> =item System V interprocess communication functions X X X X X X =for Pod::Functions =SysV L|/msgctl ID,CMD,ARG>, L|/msgget KEY,FLAGS>, L|/msgrcv ID,VAR,SIZE,TYPE,FLAGS>, L|/msgsnd ID,MSG,FLAGS>, L|/semctl ID,SEMNUM,CMD,ARG>, L|/semget KEY,NSEMS,FLAGS>, L|/semop KEY,OPSTRING>, L|/shmctl ID,CMD,ARG>, L|/shmget KEY,SIZE,FLAGS>, L|/shmread ID,VAR,POS,SIZE>, L|/shmwrite ID,STRING,POS,SIZE> =item Fetching user and group info X X X X X X X =for Pod::Functions =User L|/endgrent>, L|/endhostent>, L|/endnetent>, L|/endpwent>, L|/getgrent>, L|/getgrgid GID>, L|/getgrnam NAME>, L|/getlogin>, L|/getpwent>, L|/getpwnam NAME>, L|/getpwuid UID>, L|/setgrent>, L|/setpwent> =item Fetching network info X X X X X X
X =for Pod::Functions =Network L|/endprotoent>, L|/endservent>, L|/gethostbyaddr ADDR,ADDRTYPE>, L|/gethostbyname NAME>, L|/gethostent>, L|/getnetbyaddr ADDR,ADDRTYPE>, L|/getnetbyname NAME>, L|/getnetent>, L|/getprotobyname NAME>, L|/getprotobynumber NUMBER>, L|/getprotoent>, L|/getservbyname NAME,PROTO>, L|/getservbyport PORT,PROTO>, L|/getservent>, L|/sethostent STAYOPEN>, L|/setnetent STAYOPEN>, L|/setprotoent STAYOPEN>, L|/setservent STAYOPEN> =item Time-related functions X