&$key() if main->can($key);is not strict safe, but:
also nice (but maybe too obfuscated?) would be (main->can($key)||sub{})->();if (my $sub = main->can($key)) { $sub->(); }
In reply to Re: Re: Subroutines reference from data
by tinita
in thread Subroutines reference from data
by Syrkres
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |