in reply to Tk::Repeat - Variable Rate?

You need to cancel your previous signal before you create the new one..
my $startsmp = $mw->Button(-text => "Sample/Change Rate", -command => sub{ if ( not defined $smp ){ $ +smp = $mw->repeat($srate, \&samp)} else { $smp->cancel; $smp = $mw->repeat($sr +ate, \&samp) } } );

Replies are listed 'Best First'.
Re^2: Tk::Repeat - Variable Rate?
by transiency (Sexton) on Mar 30, 2009 at 22:38 UTC
    Thank you david :)

    That is exactly what i was missing, fixes everything. I'm rather new to Tk, so excuse my ignorance :)

    Thanks again!
    foreach(@the_wicked){sleep(0);}