title: Perl Socket Conditional doesn't work
body: <p>I'm trying to create a server and client wherein the server returns a diferent message to the client according to what client sends. If the client makes the connection but sends nothing, the server will return message 1 and in case the client sends some data, the server will return message 2. But this doesn't work, the client stays waiting the data and nothing prints.</p>
  
  <p>Client:</p>
  
  <pre><code>use IO::Socket;
  
  my $sock = new IO::Socket::INET (
      PeerAddr =&gt; '10.1.1.28',
      PeerPort =&gt; '7070',
      Proto =&gt; 'tcp' ); 
  
  if (@ARGV != "") {
      print $sock "$ARGV[0] $ARGV[1]";
  
  } else {
      $data = &lt;$sock&gt;;
      print $data;
  }       
  
  $sock-&gt;close;
  </code></pre>
  
  <p>Server</p>
  
  <pre><code>use IO::Socket;
  my $sock = new IO::Socket::INET (
      LocalHost =&gt; '10.1.1.28',
      LocalPort =&gt; '7070',
      Proto =&gt; 'tcp',
      Listen =&gt; '1',
      );
  
  while(1) {
      my $new_sock = $sock-&gt;accept();
  
      if (&lt;$new_sock&gt; ne "") {        
          print $new_sock "conection with parameters";
      } else {
          print $new_sock "default message";  
  };
  </code></pre>