title: removing dots but not decimal dots
body: <p>I have a space delimited text file that contains periods <code>.</code> as missing data and periods as decimal separator.  I want to replace all the missing data periods with <code>NaN</code> and leave the decimal separators alone - here is an example:</p>
  
  <p>Sample data:</p>
  
  <pre><code>1981 12 23 . 4.5 . .
  1981 12 24 4.6 7.8 1.2 22.0
  1981 12 25 . . . .
  1981 12 26 2.1 . 3.1 .
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>1981 12 23 NaN 4.5 NaN NaN
  1981 12 24 4.6 7.8 1.2 22.0
  1981 12 25 NaN NaN NaN NaN
  1981 12 26 2.1 NaN 3.1 NaN
  </code></pre>
  
  <p>Any help using sed, tr, perl in a unix environment would be much appreciated </p>