perl -MTk -e '$mw = tkinit; foreach my $z (0..9) { $mw->bind("", sub{ print "$z\n"; }); } MainLoop;'