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;