#! /usr/bin/perl use warnings; use strict; use Tk; use Tk::JPEG; use FindBin; my $pattern = "$FindBin::Bin/test/*.jpg"; foreach my $bild (glob($pattern)) {  my $fenster = MainWindow->new();  my $img = $fenster->Photo(-file =>$bild, -format => "JPEG");  $fenster->Label(-image => $img)->pack;  $fenster->Button(-text => 'OK', -command => sub { $fenster->destroy() })->pack;  MainLoop(); } # foreach