sub copy_entry { $i = 0; my %hash; $search = $entrysearch->get(); $f1 = $mwf->Frame()->pack(-expand => 0,-fill => 'both' ); foreach $fr($f1) { my $i =0; foreach (1..5) { $hash{'text'} = $fr->Button( -relief => 'groove', -background => 'white', -foreground => 'black', -font => "Ariel 8 bold", -text => $row[$i], -height => 1, -width => 1 )->pack(-side=>'left',-expand => 1, -fill => 'both' ); $i++; } } }