#Open file (dirlist) for the names of the dirs to delete, then delete them
open DIRS, "< ./dirlist " or die "Can't open dirlist: $!";
my @dir_array = ;
unlink "./dirlist" or warn "Couldn't delete dirlist: $!";
#Use system command to remove directory, only deletes dirs in "./dirlist"
system "rm -rf $_";
#Prints which directories were deleted
print "Removed the following dirs:\n @dir_array\n";