Re: [PBML] Sub return value
- Hi Randal, thanks for your answer.
Sorry, but english language is not my strength.
reading perldoc perlsub give me the answer:
The return value of a subroutine is the value of the last expression
evaluated by that sub, or the empty list in the case of an empty sub.
More explicitly, a "return" statement may be used to exit the subrou-
tine, optionally specifying the returned value, which will be
in the appropriate context (list, scalar, or void) depending on the
this sub returns an array (this is the last expression evaluated).
Randal L. Schwartz wrote:
>>>>>> "Eduardo" == Eduardo Adrian Perez <eaplistas@...> writes:
> Eduardo> But, how is this implemented in perl?
> What do you mean, "implemented"? How does the C code that makes up
> /usr/bin/perl do it? That's a *long* answer. :)
> Or how do you return values from subroutines? Read "perldoc perlsub"
> and if that's still not clear, ask a more specific question.