Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Receive a message over a SocketSet some socket options (Berikutnya)
Low-level socket functions

Send a message over a socket

Daftar Isi

  • send SOCKET,MSG,FLAGS,TO

  • send SOCKET,MSG,FLAGS

    Sends a message on a socket. Attempts to send the scalar MSG to the SOCKETfilehandle. Takes the same flags as the system call of the same name. Onunconnected sockets, you must specify a destination to send to, in whichcase it does a sendto(2) syscall. Returns the number of characters sent,or the undefined value on error. The sendmsg(2) syscall is currentlyunimplemented. See UDP: Message Passing in perlipc for examples.

    Note the characters: depending on the status of the socket, either(8-bit) bytes or characters are sent. By default all sockets operateon bytes, but for example if the socket has been changed usingbinmode() to operate with the :encoding(utf8) I/O layer (seeopen, or the open pragma, open), the I/O will operate on UTF-8encoded Unicode characters, not bytes. Similarly for the :encodingpragma: in that case pretty much any characters can be sent.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Receive a message over a SocketSet some socket options (Berikutnya)