start page | rating of books | rating of authors | reviews | copyrights

Programming Perl

Programming PerlSearch this book
Previous: 3.2.6 atan2 Chapter 3
Functions
Next: 3.2.8 binmode
 

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 .


Previous: 3.2.6 atan2 Programming Perl Next: 3.2.8 binmode
3.2.6 atan2 Book Index 3.2.8 binmode