X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfunc.pod;h=92dbc2a135ad25d191859205a4a7dd5a167c427d;hb=20408e3ccf502b6ce4033d8203710405ec9ef8f6;hp=b55e1b1ba655f88bc6d3dc350bb1fcf930e41547;hpb=f827b0a6c8a4efd53c50a16b098f59ac04fd670d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index b55e1b1..92dbc2a 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -1,3 +1,4 @@ + =head1 NAME perlfunc - Perl builtin functions @@ -35,11 +36,11 @@ operator or unary operator, and precedence does matter. And whitespace between the function and left parenthesis doesn't count--so you need to be careful sometimes: - print 1+2+3; # Prints 6. - print(1+2) + 3; # Prints 3. - print (1+2)+3; # Also prints 3! - print +(1+2)+3; # Prints 6. - print ((1+2)+3); # Prints 6. + 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: @@ -48,7 +49,7 @@ example, the third line above produces: Useless use of integer addition in void context at - line 1. For functions that can be used in either a scalar or list context, -non-abortive failure is generally indicated in a scalar context by +nonabortive failure is generally indicated in a scalar context by returning the undefined value, and in a list context by returning the null list. @@ -79,117 +80,120 @@ than one place. =item Functions for SCALARs or strings -chomp, chop, chr, crypt, hex, index, lc, lcfirst, length, -oct, ord, pack, q/STRING/, qq/STRING/, reverse, rindex, -sprintf, substr, tr///, uc, ucfirst, y/// +C, C, C, C, C, C, C, C, +C, C, C, C, C/STRING/, C/STRING/, C, +C, C, C, C, C, C, C/// =item Regular expressions and pattern matching -m//, pos, quotemeta, s///, split, study +C//, C, C, C///, C, C =item Numeric functions -abs, atan2, cos, exp, hex, int, log, oct, rand, sin, sqrt, -srand +C, C, C, C, C, C, C, C, C, +C, C, C =item Functions for real @ARRAYs -pop, push, shift, splice, unshift +C, C, C, C, C =item Functions for list data -grep, join, map, qw/STRING/, reverse, sort, unpack +C, C, C, C/STRING/, C, C, C =item Functions for real %HASHes -delete, each, exists, keys, values +C, C, C, C, C =item Input and output functions -binmode, close, closedir, dbmclose, dbmopen, die, eof, -fileno, flock, format, getc, print, printf, read, readdir, -rewinddir, seek, seekdir, select, syscall, sysread, -syswrite, tell, telldir, truncate, warn, write +C, C, C, C, C, C, C, +C, C, C, C, C, C, C, +C, C, C, C, C