title: User input is terminated only on Ctrl D, instead of newline
body: <p>While reading user input from my script running on Debian, I found that user input would be terminated only after pressing Ctrl-D, instead of after hitting Enter/Return key.</p>
  
  <pre><code>my $userchoice = &lt;&gt;;
  </code></pre>
  
  <p>For my script, I require the user to enter text and terminate it with the Return/Enter key. What could be causing this in my script? </p>
  
  <p><strong>Could setting slurp mode earlier in my script be related to this?</strong></p>
  
  <p>I had a look at perdoc, but couldnt find an explanation there.</p>
  
  <pre><code>sub InteractiveMenu {
      for my $key(0 .. $#desclist) {
          my $value = $desclist[$key];
          printf (" %-3s %-20s -&gt; %-15s -&gt; %-30s\n", $key, $desclist[$key], $iplist[$key], $filelist[$key] );
      }
      print "\nAvailable choices:\n";
      printf " (R)oot key installation [installs your public key to remote servers]\n";
      printf " (S)etup remote logging [sets up user account on remotes]\n\n";
      print "Choose a server to work on:\n"; 
      chomp(my $userchoice = &lt;&gt;);
  }
  sub ListRemotes {
      print "Listing remote servers from $Confile\n";
      open my $ReadHandle, "&lt;", $Confile or die $!;
      local $/; # enable localized slurp mode
      chomp(my $content = &lt;$ReadHandle&gt;);
      close $ReadHandle;
      my @values = split('zone ', $content);
        foreach my $val (@values) {       
          #print $val."\n-------------------------\n";
          &amp;ListWorker($val);
        }
      InteractiveMenu();  
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/SEsON.jpg" alt="enter image description here"></p>