programming-examples/perl/Network/sockaddr_un($file).pl
2019-11-15 12:59:38 +01:00

13 lines
259 B
Perl

use Socket;
$file = 'transfer';
socket(SOCKET, PF_UNIX, SOCK_STREAM, 0) or die "Could not create socket.\n";
connect(SOCKET, sockaddr_un($file)) or die "Could not connect.\n";
print SOCKET "Hello from the client!\n";
close SOCKET;
exit;