I have a small perl script with a hash (frequency list of words of some text file which I can specify) and a array (list of English words). The script checks how many words of the input text file matches words in the array and then scores a percentage depending on how many words matched out of the total.
I have a folder with about a hundred text files that I want to run the same script on. I want to code my perl script to ask the user to type in the folder name, and then the script should run through all of the text files within. How can I do this?
Also, once the script has run through all of the text files I want to output them into different folders depending on the percentage they scored. For example if a text file matches 75 percent, I want the perl script to place it into a folder named '75'. How can I do this?