C.39.  $world->getline

Abstract

$world->getline function: GETs a LINE from the scrollback buffer

$text = $world->getline( line );
 
($text, $time) = $world->getline( line );
 

This function allows you to retrieve a line from the scrollback buffer, and optionally the time in which it was received.

line can be a positive number, representing the number of the line to fetch, or a negative number. If negative, that means that number of lines counting from the bottom. (That is, -1 is the last received line, -2 the one before the last, and so on.)

If the line cannot be retrieved (because it is not stored anymore), returns undef.

The time returned is represented as the number of seconds since the epoch, the same kind of value the time function would return.