http://qs321.pair.com?node_id=11111371


in reply to Re: Possible precedence issue with control flow operator
in thread Possible precedence issue with control flow operator

A return is evaluated in the context of the sub's caller.

so this variant

my $result; $result = something() or croak "Something went wrong"; return $result;

is safer (resp. only correct) if it's supposed to be a scalar.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice