in reply to Is it possible to use a scalar to call a subroutine?
my $result=eval{$sub); print($@ ? "Exception: $@\n" : $result); [download]