#!/usr/bin/perl use strict; use IO::Socket::SSL qw(debug0); my $client = IO::Socket::SSL->new( # where to connect PeerHost => q[192.168.0.1], PeerPort => q[6666], SSL_verify_mode => SSL_VERIFY_PEER, SSL_cert_file => q[./client.crt.pem], ) or die "failed connect or ssl handshake: $!,$SSL_ERROR"; # receive string over SSL connection my $string = <$client>; print "Output = $string\n";