use strict; use warnings; use Tk; my $mw = MainWindow->new(); my $long_text = <Label( -text => $long_text, -wraplength => 250, )->pack( -fill => 'both', -expand => 1, ); $l->bind( '', => [ \&ResizeMe, Ev('w') ] ); sub ResizeMe { my $l = shift; my $w = shift; # Amazingly, this does not lead to infinite recursion. $l->configure( -wraplength => $w ); } MainLoop;