title: Turn off echo IO::Socket::INET
body: <p>I am trying to create a remote-login script with perl. I am currently getting input data using </p>
  
  <pre><code>$var = &lt;$client&gt;; 
  chomp $var;
  </code></pre>
  
  <p>However, I am trying to have the client input a password and I want to hide the password in the linux fashion with the client by not echoing what is typed. Is there any way I can do this?</p>
  
  <p>EDIT:</p>
  
  <pre><code>$serv = IO::Socket::INET-&gt;new ( 
  Proto =&gt; 'tcp',
  LocalPort =&gt; $port,
  Listen =&gt; 10,
  Reuse =&gt; 1)
  || die "Can't create server: $!";
  
  while ($client = $serv-&gt;accept()) {
  eval {
  $client-&gt;autoflush(1); # Always remember to flush!
  $who = $client-&gt;peerhost;
  print STDERR "Connection from $who\n";
  print $client hostname . " login: ";
  $usr = &lt;$client&gt;;
  chomp $usr;
  $usr =~ s/\W//g;
  print STDERR "User $usr\n";
  die unless (length $usr &lt; 20 &amp;&amp; length $usr &gt; 1);
  print $client "Encrypted Password: ";
  $pass = &lt;$client&gt;;
  chomp $pass;
  die unless (length $pass &lt; 20 &amp;&amp; length $pass &gt; 1);
  print STDERR "$who: Pass $pass\n";
  };
  close $client;
  } 
  </code></pre>