From 227723589c9564b9b2b7042dd27eb9aad56a560a Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Thu, 17 Feb 2011 17:31:37 +0000 Subject: New tlperl part XI git-svn-id: svn://tug.org/texlive/trunk@21433 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tlperl/lib/pods/perlfunc.pod | 7737 +++++++++++++++++++++++++++++ 1 file changed, 7737 insertions(+) create mode 100644 Master/tlpkg/tlperl/lib/pods/perlfunc.pod (limited to 'Master/tlpkg/tlperl/lib/pods/perlfunc.pod') diff --git a/Master/tlpkg/tlperl/lib/pods/perlfunc.pod b/Master/tlpkg/tlperl/lib/pods/perlfunc.pod new file mode 100644 index 00000000000..6b454cc9a59 --- /dev/null +++ b/Master/tlpkg/tlperl/lib/pods/perlfunc.pod @@ -0,0 +1,7737 @@ +=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 a 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, splice() has three scalar +arguments followed by a list, whereas gethostbyname() 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 B<-w> switch 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 C