in reply to perl tk: killing a subroutine

Howzabout this?:

my $abort = 0; MainLoop; sub startLoop { while (1) { sleep (2); print STDERR "startLoop: still sleeping\n"; $mw -> update(); last if $abort; } } sub interruptLoop { #something to interrupt startLoop and return to MainLoop? print STDERR "I've been pressed\n"; $abort = 1; }

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: perl tk: killing a subroutine
by mtmcc (Hermit) on Jul 24, 2013 at 18:46 UTC
    Genius.

    Thank you Browser!