Change $top_frame->destroy; to $toplevel->destroy; and it will work. You see you are destroying the frame in the new TopLevel window but not the new TopLevel window itself.
Update: BlueBlazerRegular beat me to it... That's what I get for trying an example out before posting it. ;)
In reply to Re: How to get rid of a TopLevel window
by Mr. Muskrat
in thread How to get rid of a TopLevel window
by blackadder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |