Perl getsockname Function


Advertisements


Description

This function returns a packed address of the local end of the network socket SOCKET.

Syntax

Following is the simple syntax for this function −

getsockname SOCKET

Return Value

This function returns undef on error otherwise Packed address of local socket in scalar cotext.

Example

Following is the example code showing its basic usage −


When above code is executed, it produces the following result −




Advertisements