X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfunc.pod;h=67c305ca6bc727253bc0356ea0caa9f30e1e8194;hb=03d70c897754d6af90de9d0ffe2857d000d6f2d7;hp=7aaeaf3d3bdd69c8e0a4ead6f103eb1c026f2fd5;hpb=b76cc8ba45957a82b545cf2a7b818233e6c0d507;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 7aaeaf3..67c305c 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -172,7 +172,7 @@ C, C C, C, C, C, C, C, C, C, C, C, C, -C, C +C, C, C =item System V interprocess communication functions @@ -234,8 +234,9 @@ C, C, C, C, C, C above. The Time::HiRes module from CPAN -may also help. +it, or else see L above. The Time::HiRes module (from CPAN, +and starting from Perl 5.8 part of the standard distribution) may also +help. See also the POSIX module's C function. +=item sockatmark SOCKET + +Returns true if the socket is positioned at the out-of-band mark +(also known as the urgent data mark), false otherwise. Use right +after reading from the socket. + +Not available directly, one has to import the function from +the IO::Socket extension + + use IO::Socket 'sockatmark'; + +Even this doesn't guarantee that sockatmark() really is available, +though, because sockatmark() is a relatively recent addition to +the family of socket functions. If it is unavailable, attempt to +use it will fail + + IO::Socket::atmark not implemented on this architecture ... + +See also L. + =item socket SOCKET,DOMAIN,TYPE,PROTOCOL Opens a socket of the specified kind and attaches it to filehandle @@ -4222,6 +4297,12 @@ loop control operators described in L or with C. When C is in effect, C sorts LIST according to the current collation locale. See L. +Perl does B guarantee that sort is stable. (A I sort +preserves the input order of elements that compare equal.) 5.7 and +5.8 happen to use a stable mergesort, but 5.6 and earlier used quicksort, +which is not stable. Do not assume that future perls will continue to +use a stable sort. + Examples: # sort lexically @@ -4378,11 +4459,15 @@ splits on whitespace (after skipping any leading whitespace). Anything matching PATTERN is taken to be a delimiter separating the fields. (Note that the delimiter may be longer than one character.) -If LIMIT is specified and positive, splits into no more than that -many fields (though it may split into fewer). If LIMIT is unspecified -or zero, trailing null fields are stripped (which potential users -of C would do well to remember). If LIMIT is negative, it is -treated as if an arbitrarily large LIMIT had been specified. +If LIMIT is specified and positive, it represents the maximum number +of fields the EXPR will be split into, though the actual number of +fields returned depends on the number of times PATTERN matches within +EXPR. If LIMIT is unspecified or zero, trailing null fields are +stripped (which potential users of C would do well to remember). +If LIMIT is negative, it is treated as if an arbitrarily large LIMIT +had been specified. Note that splitting an EXPR that evaluates to the +empty string always returns the empty list, regardless of the LIMIT +specified. A pattern matching the null string (not to be confused with a null pattern C, which is just one member of the set of patterns @@ -5431,7 +5516,7 @@ Does the opposite of a C. Or the opposite of a C, 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. - unshift(ARGV, '-e') unless $ARGV[0] =~ /^-/; + unshift(@ARGV, '-e') unless $ARGV[0] =~ /^-/; Note the LIST is prepended whole, not one element at a time, so the prepended elements stay in the same order. Use C to do the @@ -5543,6 +5628,13 @@ command if the files already exist: $now = time; utime $now, $now, @ARGV; +If the first two elements of the list are C, then the utime(2) +function in the C library will be called with a null second argument. +On most systems, this will set the file's access and modification +times to the current time. (i.e. equivalent to the example above.) + + utime undef, undef, @ARGV; + =item values HASH Returns a list consisting of all the values of the named hash. (In a