Answers for "perl make a new directory"

0

perl make a new directory

use strict;
use warnings;

sub main {
    my $directory = "temp";
    
    unless(mkdir $directory) {
        die "Unable to create $directory\n";
    }
}

main();
Posted by: Guest on October-12-2021
0

perl make a new directory

use strict;
use warnings;

sub main {
    my $directory = "temp";
    
    unless(-e $directory or mkdir $directory) {
        die "Unable to create $directory\n";
    }
}

main();
Posted by: Guest on October-12-2021

Code answers related to "perl make a new directory"

Browse Popular Code Answers by Language