Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Sub return value

Expand Messages
  • Eduardo Adrian Perez
    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
    Message 1 of 3 , Mar 2, 2006
    • 0 Attachment
      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
      evaluated
      in the appropriate context (list, scalar, or void) depending on the
      .....

      this sub returns an array (this is the last expression evaluated).

      Regards


      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.
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.