$text->bind('<>', sub{ if ($len ne $text->Contents ){ $len = $text->Contents; warn "text changed\n"; $text->editModified(0) } } );