I wrote c program that outputs all permutations of a word to a txt file.
ate aet tae tea eat eta
I also have a txt file of all the words in the dictionary. I would like to take the first entry in permutations.txt and search dictionary.txt to see if its a valid word then the second entry ect...
I have a little experience using perl, but only for parsing one file. Would it be a good fit for what i'm trying to do. Anybody have some suggestions or point me in the right direction?
You can do this easily in Perl. A hash in Perl works sort of like a dictionary in that it consists of unique keys associated with values, so read all the words from your dictionary file into memory as keys to a hash. Since you don't care about definitions of the words you don't need to associate any values with the keys in your hash, so make the values undef . Having all your dictionary words stored as keys in a hash allows you to test if any given word exists in the hash much more easily than having to look for it in the dictionary file. For an introduction to using hashes in Perl see http://www.perltutorial.org/perl-hash.aspx
All your sample data words are in lower case letters but, in case future data include mixed-case words, make sure to convert every word to either upper or lower case (choose one or the other but be consistent) as you read it into each variable (including words in your dictionary) so you won't make the mistake of searching for 'teA' in your hash which may have only an entry for 'Tea'.