title: how to compare 2 strings by each characters in perl
body: <p>basically I want to compare </p>
  
  <pre><code>$a = "ABCDE";
  $b = "--(-)-";
  </code></pre>
  
  <p>and get output CE.</p>
  
  <p>i.e where ever parentheses occur the characters of $a should be taken.</p>