in reply to use slack;

> Is there a strict way to do something similar?
Sure.

foreach $_(@actions){ if($in eq $_){no strict 'refs'; &$_()}}
There you go.