my ($stars, $stripes) = [[120,120],[50,682],[1952,2001]], # etcetera... [left,top] [[0,100],[0,150],[0,250]]; # etcetera... foreach (@$stars) { $Win->addButton( -text => '*', -name => 'Star', -left => $_->[0], -top => $_->[1], -width => 20, -height => 20) } # similar for stripes #### $stripes = [ map { [ 0, 50*$_ ] } (0..6) ]; # or something like that