programming-examples/perl/Network/Read the First Line from Remote Server.pl

9 lines
146 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
use IO::Socket;
my $server = "localhost";
my $fh = IO::Socket::INET->new($server);
my $line = <$fh>;
print $line;