#!/usr/bin/perl -W use warnings 'all'; use strict; use Tk::Pane; my $mw = Tk::MainWindow->new(); my $pane = $mw->Scrolled( 'Pane', -scrollbars => 'oe' )->pack( -expand => 'yes', -fill => 'both', # "-fill => 'y'" works, too ); my @list; for my $text ('A' .. 'Z') { my $value; $pane->Checkbutton( -anchor => 'w', -text => $text, -variable => \$value, )->pack( -side => 'top', -fill => 'x', ); push @list, \$value; } Tk::MainLoop(); printf "%s\n", $$_||0 foreach @list;