0

So; new to this perl mess
But I'm wanting to write a little snippet that performs what seems to be a simple action.

I have three text files
Text1 contains a list of items that are required
Text2 contains a list of items (some may be on the list of required items, some may not)
Text3 contains the "answer" file, as it were.

I want the snippet to compare the contents of Text2 against the contents of Text1; if there are items in Text1 that are not in Text2; I want the snippet to output them into Text3

If there is stuff in Text2 that is not present in Text1, I simply don't care.

I guess a kitchen analogy works for shopping lists?
I want to make burgers, my recipe(Text1) calls for tomatoes, hamburger meat, buns, cheese, ketchup and my pantry(Text2) contains tomatoes, corn, onions, relish, dog food, buns and ketchup Text3 needs to contain my shopping list of presumably hamburger meat, cheese.. whatever..

I've looked at some of the other threads and they seem to be cumulative listing..

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by odubhthaigh
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.