#!/usr/bin/perl -w use strict; use warnings; use Tk; my $mw      = MainWindow->new; my @colours = qw(red green blue yellow white); my @text    = qw(L a b e l t e x t); for( @text ) {    $mw->Label( -text => $_, -fg => $colours[rand @colours] )->pack( -side => 'left' ); } MainLoop();