title: append elements into an array element
body: <p>In my Perl program, I am reading an email by decoding it, splitting it into an array. In the snippet below, I am reading the elements and appending it until I find 'Email' or 'Phone' or 'GoToAssist'.</p>
  
  <pre><code>75  while(!($plain[$j] =~ /[Email|Phone|GoToAssist]/)){     
  76      $plain[$x] .= "&amp;nbsp;" . $plain[$j];
  77      $j++;
  78  }
  </code></pre>
  
  <p>However, I am getting the following error:</p>
  
  <pre><code>Use of uninitialized value in concatenation (.) or string at test.pl line 76, &lt;GEN0&gt; line 921.
  Use of uninitialized value in pattern match (m//) at test.pl line 77, &lt;GEN0&gt; line 921.
  </code></pre>
  
  <p>The code was working properly previously, I have hardly changed anything. I am wondering what went wrong.</p>