Perl connect Function
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.
Following is the example code showing its basic usage:
When above code is executed, it produced following result: