perl-5.38.0
send SOCKET,MSG,FLAGS,TO
send SOCKET,MSG,FLAGS

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

ソケットにメッセージを送ります。 スカラ MSG を ファイルハンドル SOCKET に送ろうとします。 同名のシステムコールと同じフラグが指定できます。 接続していないソケットには、send to に接続先を指定しなければならず、 この場合、sendto(2) を実行します。 送信した文字数か、エラー時には、未定義値を返します。 システムコール sendmsg(2) は現在実装されていません。 例については "UDP: Message Passing" in perlipc を参照してください。

Note that if the socket has been marked as :utf8, send will throw an exception. The :encoding(...) layer implicitly introduces the :utf8 layer. See binmode.

ソケットが :utf8 とマークされている場合、 send は例外を投げることに注意してください。 :encoding(...) 層は暗黙に :utf8 層を導入します。 binmode を参照してください。