title: How do I replace all occurrences of certain characters with their predecessors?
body: <pre><code>$s = "bla..bla";
  $s =~ s/([^%])\./$1/g;
  </code></pre>
  
  <p>I think it should replace all occurrences of <code>.</code> that is not after <code>%</code> with the character that is before <code>.</code>.</p>
  
  <p>But <code>$s</code> is then: <code>bla.bla</code>, but
   it should be <code>blabla</code>. Where is the problem? I know I can use quantifiers, but I need do it this way.</p>