Search notes:

Perl function: mkdir

Perl's mdkir won't create nested (sub-)directories (as a shell's mkdir without the -p option).
To create nested subdirectories, use the Perl module File::Path (function make_path):
#
#   mkdir FILENAME, MASK
#   mkdir FILENAME
#   mkdir
#
use warnings;
use strict;

use File::Path qw(rmtree make_path);


rmtree     'new-directory' if -d 'new-directory';
mkdir      'new-directory' or die "could not create new-directory";

mkdir      'another-directory/sub-directory' or print "mkdir cannot recursively create directories, use File::Path->make_path instead\n";
make_path  'another-directory/sub-directory' or die;
Github repository about-perl, path: /functions/mkdir.pl

See also

Perl functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758207232, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/functions/mkdir(59): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78