in reply to while loops and perl/Tk

See danger's reply to Updating a Tk Widget from a foreach loop for information on how to work with Tk objects while under the control of MainLoop.

Update: Thanks, but go upvote the linked post instead.