That's normal behavior because the callback is called when the widget is first created and when each value is changed.
The trick is to keep the callback down to the fewest possible
values; hence the value can be modified by user interaction
just like other widgets. Using an example from the source:
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $top = MainWindow->new();
$top->title("scale tests");
my $f = $top->Frame(
-relief => 'ridge',
-borderwidth => 3,
);
my $s = $top->Scale(
"-orient" => "horizontal",
"-length" => 300,
"-from" => 0,
"-to" => 250,
"-tickinterval" => 25,
"-command" => sub {
my $s;
$f->configure(
'-width' => $s->get
)
}
);
$s->pack(-side => 'left', -fill => 'y');
$f->pack(-side => 'right', -fill => 'y');
Tk::MainLoop;