#!/usr/bin/perl use strict; use warnings; use Tk; my $main = MainWindow->new; my $label1 = $main->Text( -width => 50 )->pack; my $count = 0; my @texts = ( "This is the first piece.\n", "This is the second.\n", "This is the third.\n", "etc...\n", ); my $button = $main->Button( -text => "Next", -command => sub { $label1->insert('1.0', $texts[$count++]); } )->pack; MainLoop;