#!/usr/bin/perl -w
######################################################################
# checkbutton.pl
######################################################################
# Perl Power! - Michael Schilli 1998
######################################################################

use Tk;

$top=MainWindow->new();

$top->Checkbutton(-text => "Check me", 
                  -command => \&callback,
                  -variable => \$checkvalue,
                  -onvalue => "ON", 
                  -offvalue => "OFF")->pack();
MainLoop;

sub callback {
    print "Check button is $checkvalue\n";
}

