Answers for "Create a directory in perl if it doesn't exist with certain permissions"

0

Create a directory in perl if it doesn't exist with certain permissions

use strict;
use warnings;

sub main {
    my $directory = "fruit";

    unless(mkdir($directory, 0755)) {
        die "Unable to create $directory\n";
    }
}

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

Code answers related to "Create a directory in perl if it doesn't exist with certain permissions"

Browse Popular Code Answers by Language