title: How can I find out if two strings are mostly equal (in perl)?
body: <p>I have a string that I want to compare against an array of strings, and return the array element that most closely matches.  </p>
  
  <p>I can write a sliding correlator that counts the number of matching characters at each step and returns the max correlation.  But is there a better way?</p>
  
  <p>For example:<br>
  control_string = drv_probability_1_max</p>
  
  <p>List:<br>
      burst_period_min/max<br>
      duty_cycle_min/max<br>
      probablility_0_min/max<br>
      probablility_1_min/max</p>
  
  <p>Where ideally it returns "probablility_1_min/max"</p>