my $change_mode = \&change_mode; ... # Case 2: Callback routine called with argument (corrected): # given that $change_mode is a ref to a sub $main->Button(-text => 'To Upper Case', -command => [ $change_mode, 2 ] )->pack;