if (exists $commands{$command}) { my ($result) = eval "&$command"; ... }