Hi I am new to Perl and I am trying to change the directory in Linux by call a Perl script how my script works: It takes Input from user which directory name they want and then it cd into that directory and perform something.
#!/grid/common/bin/perl
 use File::chdir;
 use Cwd;
 print "Directory name \n";
 $dir = <STDIN>;
 $mkdir = `mkdir $dir`;
 print "creating dir";
 $newdir = "$mkdir";
 chdir( $newdir ) or die "Couldn't go inside $newdir directory, $!";
P.S I googled before asking this question and I could not find the solution tried chdir, calling bash script in perl none of them worked can you guys please help me. thanks in advance :)
 
    