I am using a user input variable as my initial directory name, but when trying to expand the directory and create sub-folders, utilizing that variable causes issue in the path.
#!/usr/bin/perl
use strict;
use warnings;
print "What would you like to name your directory?\n";
chomp( my $directory = <STDIN> );
mkdir $directory, 0755;
mkdir $directory/data, 0755; ##<----<<Error begins here##
mkdir $directory/data/image, 0755;
mkdir $directory/data/cache, 0755;
use diagnostics;and try again.use strict;anduse warnings;. Tiz nice to see a new user having already learned that most important lesson.