in reply to Re: create directory with input
in thread create directory with input

It didnt work when I used
my $dir = "C:\\Users\\darkblack\\Desktop\\".$directory_name; or my $dir = "C:\\Users\\darkblack\\Desktop\\.$directory_name";

Replies are listed 'Best First'.
Re^3: create directory with input
by poj (Abbot) on Dec 03, 2017 at 13:14 UTC
    It didnt work

    What was the error message,"Invalid argument" ?. Try adding chomp

    #!perl use strict; use warnings; my $cwd = 'C:/Users/darkblack/Desktop'; print "Enter directory name > "; chomp(my $dir = <STDIN>); $dir = "$cwd/$dir"; mkdir( $dir , 0755 ) or die "Could not create $dir : $!"; print "Directory $dir created successfully\n";
    poj
      Thank , Its works.
Re^3: create directory with input
by LanX (Saint) on Dec 03, 2017 at 13:10 UTC