my $foo;
eval { my $foo = bar->something() }; die $@ if $@;
return $foo;
i.e. catching and rethrowing an exception at the same time as returning the return value is no exceptions. In reply to eval and return values by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |