use warnings; use strict; use Tk; my @data = qw(null eins zwei drei); my @data_2 = qw(nil one two three); my @display; my $mw = MainWindow->new; for my $i (1..3) { push @display, $mw->Label( -textvariable=>\$data[$i], ) ->pack; } my $toggle_button = $mw->Button( -text=>"English!", -command=>sub{print \$data[1]; @data = @data_2; print \$data[1];}, )->pack; MainLoop;