title: Why is my Perl program not reading from the input file?
body: <p>I'm trying to read in this file:</p>
  
  <pre><code>Oranges
  Apples
  Bananas
  Mangos
  </code></pre>
  
  <p>using this:</p>
  
  <pre><code>open (FL, "fruits");
  @fruits
  
  while(&lt;FL&gt;){
  chomp($_);
  push(@fruits,$_);
  }
  
  print @fruits;
  </code></pre>
  
  <p>But I'm not getting any output. What am I missing here? I'm trying to store all the lines in the file into an array, and printing out all the contents on a single line. Why isn't chomp removing the newlines from the file, like it's supposed to?</p>