Read the first line from a remote server : Client « Network « Perl






Read the first line from a remote server

    



#!/usr/bin/perl


use IO::Socket;

my $server = "localhost";
my $fh     = IO::Socket::INET->new($server);
my $line   = <$fh>;
print $line;

   
    
    
    
  








Related examples in the same category

1.Time client
2.Two way client
3.The Client Program
4.The Client with Socket
5.A Daytime Client