$exit_frame->Button(-text => "Track", -command => [ \&track_changes, ($listbox, $output, $report_type) ])->pack; #### $exit_frame->Button(-text => "Track", -command => [ \&track_changes, ($listbox, \$output, \$report_type) ])->pack; #### 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"; }