\&selection("option1")
This is not a reference to subroutine called with a parameter. In fact, there's no such a thing as a code reference plus parameters. You have two options:
-browsecmd => sub { selection('option1') }
-browsercmd => [ \&selection, 'option1' ]
In reply to Re: Tk::Browseentry -browsecmd Option with Subroutine Parameter
by choroba
in thread Tk::Browseentry -browsecmd Option with Subroutine Parameter
by erpse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |