What was the error message,"Invalid argument" ?. Try adding chomp
poj#!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";
In reply to Re^3: create directory with input
by poj
in thread create directory with input
by darkblackblue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |