Perl Programming/Keywords/mkdir

The mkdir keyword
mkdir creates a new directory with the name specified by FILENAME with the given MASK for permissions. Without MASK, the value 0777 is taken. Trailing slashed are removed from FILENAME.

mkdir returns true on success and false otherwise. It also and sets <tt>$!</tt> (<tt>errno</tt>).

If the operating system supports <tt>fchdir(2)</tt>, a <tt>DIRHANDLE</tt> or <tt>FILEHANDLE</tt> can also be used. If this is not the case, an exception is raised.