use strict; use warnings; use Tkx; my $mw = Tkx::widget->new("."); $mw->g_wm_title("Jobs Not Forecasted"); Tkx::button(".b", -text => "18-Letters", -background => "red", -width => 11, -command => sub { print "18L\n"; print "18L #2\n"; }, # OK # -command => sub { print "18L\n"; Tkx::.b::call(".b", "configure", "-background", "blue"); }, # BAD, runtime error # -command => sub { print "18L\n"; Tkx::button::call(".b", "configure", "-background", "blue"); },# BAD, runtime error # -command => sub { print "18L\n"; Tkx::".b"::call(".b", "configure", "-background", "blue"); }, # BAD, syntax error ); Tkx::pack(".b"); Tkx::button(".s", -text => "EXIT", -width => 11, -command => sub { Tkx::destroy("."); }, ); Tkx::pack(".s"); Tkx::MainLoop();