title: perl: concatenate lines into a single string
body: <p>I have a file that looks something like this:</p>
  
  <pre><code>hellothisisline1
  andthisisline2hi
  yepthisistheline
  </code></pre>
  
  <p>I want to concatenate the lines so that into a single string</p>
  
  <p><code>hellothisisline1andthisisline2hiyepthisistheline</code></p>
  
  <pre><code>print "Input file name \n";
  open (FILE, &lt;&gt;);
  $string = "";
  while($line = &lt;FILE&gt;) {
     $string = $string . "" . $line;
  }
  print "$string \n";
  </code></pre>
  
  <p>But that didn't seem to work and the output is the file in its original format.</p>