C.64. $world->mlsend

Abstract

$world->mlsend function: Multi-Line SEND

$success = $world->mlsend( attributes );
 

This function emulates the Multi-line Send feature (see Section 6.3.5, “Multi-line Send”) from perl scripts. Several lines can be sent at once, optionally prefixing and/or suffixing each line with text you specify. It's also possible to send the contents of a file to the MUD. The lines can be sent with customized intervals between them (so as not to cause buffer overflows that lead to a disconnection from the server).

atributes is a reference to a hash defining attributes for the timer. Generally the call works like this:

$world->mlsend({ attribute1 => value1,
                 attribute2 => value2, ... })

Possible attributes:

On success, returns true. If the file does not exist or cannot be open, this function does nothing and returns a false value. It returns undef if invalid parameters are specified.

You might also want to see the $world->sendlines and $world->sendfile functions which are simpler ways of sending several lines or the contents of a file at once, respectively.