1 2 3 4 5 6 7
... $tk->button( -text => 'show some args', -command => \&show_me_args ) ... sub show_me_args { warn join "\n", "arguments:", @_; }
1 2 3 4 5 6 7 8 9 10 11
foreach (@Liste) { $mw->Button( -text => $_, -command => [\&button_press, $_] ); } sub button_press { my $button = shift; print $button; }