Without the benefit of having tried perltray, it looks like this should work: ["Do Something", sub { DoSomethingSub($a, $b, $c) } ]
| [reply] [d/l] |
Yes, that should work. You can also use the string form:
["Do Something", 'DoSomethingSub($a, $b, $c)']
This string will get evaluated when you execute the menu option. Therefore you should only use package variables in the string, as lexicals will be out of scope at the point it is evaluated. And be careful to use single quotes on the string to make sure that the variables are not interpolated into the string at the time the menu is constructed.
| [reply] [d/l] |