Book HomeMastering Perl/TkSearch this book

8.8. Retrieving Text

The get function is one you'll use a lot. It returns the text located from index1 to index2. If index2 isn't specified, only the character located at index1 is returned. The usage of get is as follows:

$t = $text->get(index1 [ , index2 ]);

As with any index ranges, index1 must be less than or equal to index2, or an empty string will be returned.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.