This function connects to the remote socket using the filehandle SOCKET and the address specified by EXPR. The EXPR should be a packed address of the appropriate type for the socket.
Following is the simple syntax for this function −
connect SOCKET, EXPR
This function returns 0 on failure and 1 on success.