in reply to Re: First Pattern Matching
in thread First Pattern Matching

I just noticed that your answer is still incomplete. It only outputs the last match, and not the last pattern matched. For instance: BCB is not the same as B.B. You'll still have to do some sort of pattern lookup (such as I did below, or use something like Tie::Hash::Regex or Tie::Hash::Approx to construct a table and then match against that.