mkdir
Creates a new directory with the specified permissions.
Creates a directory with the given name. The optional second
argument specifies the permissions mode (default 0777), which
is modified by the process umask before being applied. If no
arguments are given, uses $_ as the directory name.
Returns 1 on success, 0 on failure. On failure, sets $! to
the OS error code (e.g. EEXIST, EACCES).
Synopsis
mkdir("newdir", 0755) or die "Cannot mkdir: $!";
mkdir("newdir"); # default mode 0777 (modified by umask)
mkdir $_; # uses $_ if no argument