in reply to IO::Socket:SSL 'No such file or directory'

The second error message you're getting is because (I'm willing to bet, though I don't have the module's code here) you're calling a subroutine that was designed as a method as if it were a regular subroutine. But a method is designed to take a reference to an object first (and an object is a reference to some kind of data structure that's been blessd into a package). Long story short: that sub expects to be called as a method, and to be passed a hashref as its first argument. By calling it directly, you're upsetting its expectations. So call it as a method of your $sock object:

$sock->context_init(SSL_use_cert =>1, SSL_key_file =>'certs/sev/er-key.pem', SSL_cert_file =>'certs/server-cert.pem');

Depending on your setup, you might want to make those relative paths absolute, in case you move the script.

HTH!

perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'