C.79. $world->sendlines

Abstract

$world->sendlines function: SENDs several LINES to the world

$success = $world->sendlines( multi-line string ,
  [delay ,
  [n-lines]] );
 
$success = $world->sendlines( [ line 1, line 2, ... ] ,
  [delay ,
  [n-lines]] );
 

Sends several lines of text to the world. delay is the number of seconds to wait between sending each group of lines, and n-lines is the number of lines to send a time. If these values are not specified, they are taken from the defauls set in the Preferences dialog (see Section 5.2, “Sending”).

There are two ways to specify the lines to be sent: the first is passing a multi-line string, which is split into lines and each line is sent separately. The second one is passing a reference to an array where each element consists of one line.

This function always returns true.

For more options, see the $world->mlsend function which allows adding a text before and/or after each line, and sending lines before and/or after sending the contents of the file.