PerlVader has asked for the wisdom of the Perl Monks concerning the following question:
Hi PerlMonks
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can a user specify a input folder
by moritz (Cardinal) on Dec 10, 2012 at 09:18 UTC | |
|
Re: How can a user specify a input folder
by marquezc329 (Scribe) on Dec 10, 2012 at 08:24 UTC | |
|
Re: How can a user specify a input folder
by CountZero (Bishop) on Dec 10, 2012 at 10:43 UTC |