Programming Perl

Programming PerlSearch this book
Previous: 3.2.138 semopChapter 3
Functions
Next: 3.2.140 setpgrp
 

3.2.139 send

send SOCKET, MSG, FLAGS, TO
send SOCKET, MSG, FLAGS

This function sends a message on a socket. It takes the same flags as the system call of the same name - see send(2). On unconnected sockets you must specify a destination to send TO, in which case send works like sendto(2). The function returns the number of bytes sent, or the undefined value if there is an error. On error, it puts the error code into $!.

(Some non-UNIX systems improperly treat sockets as different objects than ordinary file descriptors, with the result that you must always use send and recv on sockets rather than the handier standard I/O operators.)


Previous: 3.2.138 semopProgramming PerlNext: 3.2.140 setpgrp
3.2.138 semopBook Index3.2.140 setpgrp