for my $i (1..int($checkbuttonzahl/3)) { # jetzt erstmal einen Frame erzeugen $frame = $page1->Frame(-background => 'sky blue') ->pack(-side => "top", -fill => "x", -expand => 1); # dann kann man die 3 nächsten Suchmaschinen eintragen for my $j (0..2) { $checkbuttons[($i-1)*3+$j] = $frame->Checkbutton(-text => $av_searches[($i-1)*3+$j], -font => '{Bimini} 12 {bold}', -background => 'sky blue', -activebackground => 'sky blue', -onvalue => (($i-1)*3+$j)+1, -command => sub { testus(); }, -variable => \$suchers[($i-1)*3+$j])->pack(-side => "left"); } }