#find current directory use Cwd; #Cwd module print "You are now in: ", cwd, "\n"; #cwd function chdir 'subdir/' or warn "Directory subdir/ not accessible: $!"; print "You are now in: ", cwd, "\n"; chdir '..' or warn "Directory subdir/ not accessible: $!"; #one level up print "You are now in: ", cwd, "\n"; #chdir '/' or warn "Directory subdir/ not accessible: $!"; #to root dir #print "You are now in: ", cwd, "\n"; #create directory print "Directory to create?"; my $newdir = ; chomp $newdir; mkdir ($newdir, 0755) || die "Failed to create $newdir $!"; #mkdir newdir, permission; MS-DOS and Windows users, just use 0755 #remove directory print "Directory to be removed?"; my $baddir = ; chomp $baddir; rmdir $baddir; #removing files chdir 'subdir/' or warn "Directory subdir/ not accessible: $!"; unlink <*.doc>;