#!/usr/bin/perl #Script to create required directories in user provided location argum +ent. my $Dir = $ARGV[0]; if(! -e "$Dir") { print "Please try again with a valid directory.\n"; exit 1; } elsif(! -d "$Dir") { print "Please try again with a valid directory.\n"; exit 1; } elsif(($#ARGV+1) < 1) { print "Please try again with a valid directory.\n"; exit 1; } #Change to user selected location chdir($Dir);
In reply to Help with exercise by codeKnight
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |