use Tk; use Tk::HList; my $mw = MainWindow->new(-title=>'HList'); my $hlist = $mw->HList->pack; foreach(qw/one two three one.apple two.grapes three.apple/){ my $path = $_; (my $display_entry = $_) =~ s/.*\.//; my $uc_entry = uc($display_entry); $hlist->add($_, -text => $uc_entry); } MainLoop;