in reply to tie variable

Tk::Trace
#!/usr/bin/perl -- use strict; use warnings; use Tk; use Tk::Trace; my $mw = tkinit; my $tv = "yo"; my $tt = $mw->Entry( )->pack; $tt->configure( -textvariable , \$tv ); $mw->traceVariable( \$tv, 'w' => [ sub { warn "you changed it @_ "; $ +_[1]; } ] ); $mw->after( 1000 => sub { $tv.= ' '.rand.' '; } ); $mw->MainLoop;

Replies are listed 'Best First'.
Re^2: tie variable
by grasshopper!!! (Beadle) on May 30, 2015 at 15:09 UTC

    Thanks worked out that binding the entry keypess to sub worked