in reply to More Tk Help

Your problem is in this code:
$exit_frame->Button(-text => "Track", -command => [ \&track_changes, ($listbox, $output, $report_typ +e) ])->pack;
You are capturing the initial values of $output and $report_type, not the values as they will be later, after you have toggled the radio buttons.

A simple fix would be to hold onto references instead, like this:

$exit_frame->Button(-text => "Track", -command => [ \&track_changes, ($listbox, \$output, \$report_t +ype) ])->pack;
Then in your track_changes subroutine, do:
sub track_changes { my ($listbox, $output_ref, $report_type_ref) = @_; my @files = $listbox->curselection; for (@files) { my $file = $listbox->get($_); print "$file\n"; } print "$$output_ref\n"; print "$$report_type_ref\n"; }

Replies are listed 'Best First'.
Re^2: More Tk Help
by jdporter (Paladin) on Jan 11, 2005 at 14:19 UTC
    Even better would be to use the closure form of a Tk command, a-like so:
    -command => sub { track_changes( $listbox, $output, $report_type ) + }
    This technique requires that the variables ($output and $report_type) be lexicals, which they are.