[Chapter 3] 3.2.7 bind
Author: Larry Wall, Tom Christiansen & Randal L. Schwartz
Date: 1999-07-02T01:47:36Z

#

| Chapter 3 Functions |

### 3.2.7 bind

    bind SOCKET, NAME

This function does the same thing as the bind system call - see bind(2). It attaches an address (a name) to an already opened socket specified by the `SOCKET` filehandle. The function returns true if it succeeded, false otherwise (and puts the error code into $!). `NAME` should be a packed address of the proper type for the socket.

    bind S, $sockaddr or die "Can't bind address: $!\n";

See also the example in the section "Sockets" in Chapter 6.

3.2.6 atan2 |  | 3.2.8 binmode