So, your suspicion is correct. To fix it, move the creation of the MsgBox to the point where the value is available (inside "quiz_me"). You do not reference $front and $back elsewhere in any case.
You might want to consider making your interface a little nicer by using a Tk::DialogBox , when you get tired of annoying popup dialogs. The dialogBox could be pre-populated with the answer, which will have its VISIBLE property off. A button can then be pressed to REVEAL it. It would also help to have a NEXT button to step through the quiz. Essentially, your app becomes a single dialog box, which is a pretty standard way of implementing simple stuff.
"As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom
In reply to Re^3: Tk::MsgBox and my -message string
by NetWallah
in thread Tk::MsgBox and my -message string
by davidov0009
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |