=item mkdir FILENAME
+=item mkdir
+
Creates the directory specified by FILENAME, with permissions
specified by MASK (as modified by C<umask>). If it succeeds it
returns true, otherwise it returns false and sets C<$!> (errno).
-If omitted, MASK defaults to 0777.
+If omitted, MASK defaults to 0777. If omitted, FILENAME defaults
+to C<$_>.
In general, it is better to create directories with permissive MASK,
and let the user modify that with their C<umask>, than it is to supply
U A Unicode character number. Encodes to UTF-8 internally
(or UTF-EBCDIC in EBCDIC platforms).
- w A BER compressed integer. Its bytes represent an unsigned
- integer in base 128, most significant digit first, with as
- few digits as possible. Bit eight (the high bit) is set
- on each byte except the last.
+ w A BER compressed integer (not an ASN.1 BER, see perlpacktut for
+ details). Its bytes represent an unsigned integer in base 128,
+ most significant digit first, with as few digits as possible. Bit
+ eight (the high bit) is set on each byte except the last.
x A null byte.
X Back up a byte.
behind the scenes. Before C<require> looks for a "F<.pm>" extension,
it will first look for a filename with a "F<.pmc>" extension. A file
with this extension is assumed to be Perl bytecode generated by
-L<B::Bytecode|B::Bytecode>. If this file is found, and it's modification
+L<B::Bytecode|B::Bytecode>. If this file is found, and its modification
time is newer than a coinciding "F<.pm>" non-compiled file, it will be
loaded in place of that non-compiled file ending in a "F<.pm>" extension.
is implementation-dependent. See also L<perlport> for notes on the
portability of C<select>.
-On error, C<select> behaves like the select(2) system call : it returns
--1 and sets C<$!>.
+On error, C<select> returns C<undef> and sets C<$!>.
+
+Note: on some Unixes, the select(2) system call may report a socket file
+descriptor as "ready for reading", when actually no data is available,
+thus a subsequent read blocks. It can be avoided using always the
+O_NONBLOCK flag on the socket. See select(2) and fcntl(2) for further
+details.
B<WARNING>: One should not attempt to mix buffered I/O (like C<read>
or <FH>) with C<select>, except as permitted by POSIX, and even
produces the output 'h:i:t:h:e:r:e'.
-Using the empty pattern C<//> specifically matches the null string, and is
-not be confused with the use of C<//> to mean "the last successful pattern
-match".
+As a special case for C<split>, using the empty pattern C<//> specifically
+matches only the null string, and is not be confused with the regular use
+of C<//> to mean "the last successful pattern match". So, for C<split>,
+the following:
-Empty leading (or trailing) fields are produced when there are positive width
-matches at the beginning (or end) of the string; a zero-width match at the
-beginning (or end) of the string does not produce an empty field. For
-example:
+ print join(':', split(//, 'hi there'));
+
+produces the output 'h:i: :t:h:e:r:e'.
+
+Empty leading (or trailing) fields are produced when there are positive
+width matches at the beginning (or end) of the string; a zero-width match
+at the beginning (or end) of the string does not produce an empty field.
+For example:
print join(':', split(/(?=\w)/, 'hi there!'));