I would like to do is to have a button to close my window (button_window), but also call a function (user_info):
my $btn = $main -> Button (-text => 'Start',
-command => sub {$button_window -> destroy},
-command => \&user_info)
-> pack ();
its executing only the last command thanks in advance
The sub can take any number of calls to other subs.
It's executing only the last command because a hash parameter can have only one '-command' key, so is overwritten.