title: perl only to find and replace exact match
body: <p>I am trying to implement substitution in perl.
  I have a binary matrix and I would like to replace</p>
  
  <p>0 with 1 </p>
  
  <p>and</p>
  
  <p>1 with 2.</p>
  
  <p>So i used the following line</p>
  
  <pre><code>s/1/2/g foreach @remaining;
  </code></pre>
  
  <p>However, this command ends up replacing my column names as well which has numbers in it. it converts, for example, 1234 to 2234.</p>
  
  <p>I want it to match and replace only 1s and not 1234.</p>