Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PERL SCRIPT Please type out and post No pictures, please. Write a Perl script to

ID: 3751738 • Letter: P

Question

PERL SCRIPT

Please type out and post No pictures, please. Write a Perl script to calculate the following. 8. Write a script to create the following directory structure in a directory of user's choice. The user can supply this input as an argument; if not, prompt the user to enter one from the command line (User selected existing- Data Image directory Cache Edit the script in the prior question. Check if the user input (an existing directory) is valid; if not, ask the user to enter it again. If the "Data" directory exists, then prompt for user actions: cancel or overwrite. -this might be more difficult than using Bash. You can skip this one and come back later. 9.

Explanation / Answer

$dirname="E:/test/abc"; # new file path in E drive

if (-d $dirname and -e $dirname){

print "directory already exists ";

} else {

mkdir($dirname);

print "directory $dirname has been created " ;

}