use Widget_Lib; my $var; my $button = $frame->Button(-text => "merge", -command => sub { $var=&Widget_Lib::show_list; print "$var"; }