title: How to print variables in Perl
body: <p>I have some code that looks like</p>
  
  <pre><code>my ($ids,$nIds);
  while (&lt;myFile&gt;){
      chomp;
      $ids.= $_ . " ";
      $nIds++;
  }
  </code></pre>
  
  <p>This should concatenate every line in my <code>myFile</code>, and <code>nIds</code> should be my number of lines. How do I print out my <code>$ids</code> and <code>$nIds</code>?</p>
  
  <p>I tried simply <code>print $ids</code>, but Perl complains.</p>
  
  <pre><code>my ($ids, $nIds)
  </code></pre>
  
  <p>is a list, right? With two elements?</p>