read perlintro (and read it well, from the beginning), read when it talks about creating and initializing variables with my, opening files with open/binmode, reading the files in a while loop with readline, print strings to new file handle, and testing strings with m//atch operator in Simple matching/perlrequick