Question : perl make a new directory
Answered by : vternal3
use strict;
use warnings;
sub main { my $directory = "temp"; unless(mkdir $directory) { die "Unable to create $directory\n"; }
}
main();
Source : https://caveofprogramming.com/perl-tutorial/perl-mkdir-how-to-create-directories-in-perl.html | Last Update : Tue, 19 Oct 21
Question : perl make a new directory
Answered by : vternal3
use strict;
use warnings;
sub main { my $directory = "temp"; unless(-e $directory or mkdir $directory) { die "Unable to create $directory\n"; }
}
main();
Source : https://caveofprogramming.com/perl-tutorial/perl-mkdir-how-to-create-directories-in-perl.html | Last Update : Tue, 19 Oct 21