2 # tcpcat.pl - Send a message and receive a reply from TCP server.
4 # Copyright (c) 2003 Sampo Kellomaki <sampo@iki.fi>, All Rights Reserved.
6 # 17.8.2003, created --Sampo
8 $host = 'localhost' unless $host = shift;
9 $port = 443 unless $port = shift;
10 $msg = "get \n\r\n" unless $msg = shift;
12 print "$host $port $msg\n";
13 use Net::SSLeay qw(tcpcat);
14 print tcpcat($host, $port, $msg);