X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfunc.pod;h=a28487ac1dcb29a01900bd396f49a6e659d71195;hb=5d3b0638f4c2cf44af3831abe68fc08048b89bc2;hp=a99dffeb4d322901d778c63b6511baac866b18b5;hpb=0dccf24430a5250869822117cfec215176703c7f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index a99dffe..a28487a 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -448,7 +448,7 @@ successfully changed. See also L, if all you have is a string. =item chomp -This is a slightly safer version of chop (see below). It removes any +This is a slightly safer version of L. It removes any line ending that corresponds to the current value of C<$/> (also known as $INPUT_RECORD_SEPARATOR in the C module). It returns the total number of characters removed from all its arguments. It's often used to @@ -551,7 +551,11 @@ omitted, does chroot to $_. Closes the file or pipe associated with the file handle, returning TRUE only if stdio successfully flushes buffers and closes the system file -descriptor. You don't have to close FILEHANDLE if you are immediately +descriptor. If the file handle came from a piped open C will +additionally return FALSE if one of the other system calls involved +fails or if the program exits with non-zero status. (If the problem was +that the program exited non-zero $! will be set to 0.) +You don't have to close FILEHANDLE if you are immediately going to do another open() on it, because open() will close it for you. (See open().) However, an explicit close on an input file resets the line counter ($.), while the implicit close done by open() does not. Also, @@ -1727,7 +1731,7 @@ it succeeded, FALSE otherwise. See example in L, or C. If more than one value is listed, the list must be placed in parentheses. See L for details. +local()"> for details, including issues with tied arrays and hashes. But you really probably want to be using my() instead, because local() isn't what most people think of as "local"). See L into the next variable in the parameter - list the number of characters printed so far + %n special: *stores* the number of characters output so far + into the next variable in the parameter list -Finally, for backward (and we do mean "backward") compatibility, -Perl permits these nonstandard but unaccountably popular conversions: +Finally, for backward (and we do mean "backward") compatibility, Perl +permits these unnecessary but widely-supported conversions: + %i a synonym for %d %D a synonym for %ld %U a synonym for %lu %O a synonym for %lo @@ -3139,17 +3143,14 @@ and the conversion letter: + prefix positive number with a plus sign - left-justify within the field 0 use zeros, not spaces, to right-justify + # prefix octal with "0", hex with "0x" number minimum field width .number "precision": digits after decimal point for floating-point, max length for string, minimum length for integer l interpret integer as C type "long" or "unsigned long" - -In addition, Perl permits the following ANSI-invented flags: - - # prefix octal with "0", hex with "0x" h interpret integer as C type "short" or "unsigned short" -Finally, there is one Perl-specific flag: +There is also one Perl-specific flag: V interpret integer as Perl's standard integer type