title: PERL CTRL-D not stoping user input
body: <p>Learning perl I found that in this case CTRL+D is not working to stop user input. Its working in others scripts so probably is something realted with the code itself.</p>
  
  <p>I was reading on the internet about EOF but anything seems to work for me.</p>
  
  <p>Thank you in advance and best Regards. </p>
  
  <pre><code>#!/usr/bin/perl
  
  print "Dime tus numeros\n";
  
  @numb =&lt;STDIN&gt;;
  
  
  $cua = 0;
  $count = 0;
  $array = "@numb";
  
  $max = @numb; #tamaño array
  $joined = join('',@numb); #metemos array en sacalar juntandolo sin espacios
  $joined = $original; #guardamos el num original
  
  
  $diff = 999 - $joined;
  
  for ($i=0; i&lt;=$max;$i++){ #es &lt;= por que el arraylenght no empieza en 0
  
      $sumatotal += $numb[$i]; #vamos sumando cada elemento del array
  }
  
  
  print "Has añadido los numeros $array. \n";
  print "Combiandose en $joined que sumados entre si dan:$sumatotal \n";
  print "La diferencia entre $joined y 999 es $cua\n";
  </code></pre>