Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Interrupting a loopby choroba (Cardinal) |
on Jul 28, 2024 at 08:34 UTC ( [id://11160787]=note: print w/replies, xml ) | Need Help?? |
Under Tk, Ctrl+C no longer sends the INT signal. You can still bind <Control-c> to something, though. Also, Tk already incorporates a loop: the MainLoop. Looping over short lists is probably OK, but introducing loops that might take a long time to iterate or have a high number of iterations is wrong, you should use Tk->repeat or Tk->after instead, see Tk::after.
Update: Added the example.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|