in reply to One shot way to end a sub?
The normal way to do this in an event driven program is to have the cancel button set the flag, and then have the sub you want interruptible doing the work calls DoOneEvent() every time through its loop. This lets the GUI still process user input periodically while your sub is doing its thing. You might also check out Tk::Event.
|
|---|