title: Compare two text files in Perl
body: <p>I have several strings in two .txt file. Both of them contain some similar strings but are not arranged on the same line number.</p>
  
  <p>For example,
  file1.txt
  Carmen 
  Edison 
  Molly
  Jason
  Damon 
  Gerard</p>
  
  <p>file2.txt 
  Edison
  Jason</p>
  
  <p>I want to save the similar strings that found in both text files (in this case: Edison Jason) to an array.</p>