title: Reading a tab delimited file and concatenate selective columns in Ruby
body: <p>I have a tab delimited file, in which the first 10 columns are always present and stay at same position, but after the 10th column, the number of columns can change. I want to retain the first 10 columns as is and concatenate the rest of the columns into one column separated by <code>|</code>.</p>
  <p>Here is the sample data:</p>
  <blockquote>
  <p>columns: col1 col2 ... col 10 col11 col12 col13</p>
  <p>Values:   1    2    ... 10     11    12    13</p>
  </blockquote>
  <p>Result:</p>
  <blockquote>
  <p>Columns: col1 col2 ... col10 <strong>col11|col12|col13</strong></p>
  <p>Values: 1     2    ...  10    <strong>11  | 12  | 13</strong></p>
  </blockquote>