Name

socket

Synopsis

socket socket, domain, type, protocol

Description

Opens a socket of the specified kind and attaches it to filehandle socket. domain, type, and protocol are specified the same as for socket(2). Before using this function, your program should contain the line:

use Socket;

This setting gives you the proper constants. The function returns true if successful.

Get Perl in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.