in reply to MainLoop control

Launch your other Tk programs with a fork and exec:
# simplest way, but ignores error handing my $pid; if($pid = fork() == 0) { exec("other_tk_script"); }
Also, you can store those $pids in the main Tk script, so you can kill -9 them, if they hang, or you want to close them all together simultaneously.

Here is a preferred syntax

#!/usr/bin/perl my $kidpid; if ( !defined( $kidpid = fork() ) ) { #fork returned undef, so failed die "Cannot fork: $!"; } elsif ( $kidpid == 0 ) { # fork returned 0, so this branch is child exec("xterm -e top"); # if exec fails, fall through to the next statement die "can't exec : $!"; } else { # fork returned 0 nor undef # so this branch is parent sleep(5); my $result = kill "TERM", $kidpid; print "Killed child process $kidpid (result $result)\n"; sleep(5); }

I'm not really a human, but I play one on earth. Cogito ergo sum a bum