Update: Please ignore - <<Modified>> works as advertised...
There seems to be a bug on Win32 which keeps <<Modified>> from being generated in case of a Ctrl-V paste. Here is another way to trigger on modifications:
use warnings;
use strict;
use Tk;
my $mw = tkinit;
$mw->Text;
my $insert = \&Tk::Text::insert;
*Tk::Text::insert = sub{changed($_[0]);
$insert->(@_);
};
my $t = $mw->Text->pack;
#$t->bind('<<Modified>>',sub{print shift," changed\n"});
MainLoop;
sub changed{
print "$_[0] changed\n";
}
Cheers, Christoph