Does perl support in/out parameter subroutine?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hon Seng Phuah

    Does perl support in/out parameter subroutine?

    Hi,

    I am quite new to perl development and have a question very stupid
    question. I hope that someone can help me.

    Does perl support in/out parameter subroutine? Like in C/C++, we have
    a function callee:

    a(&b); // variable b value will be change in function a.
  • Jürgen Exner

    #2
    Re: Does perl support in/out parameter subroutine?

    Hon Seng Phuah wrote:[color=blue]
    > Does perl support in/out parameter subroutine? Like in C/C++, we have
    > a function callee:
    >
    > a(&b); // variable b value will be change in function a.[/color]

    "In/out parameter", well, I've never heard that term before, but I am
    guessing you mean call-by-reference or call-by-value-return.
    Yes, Perl does support call by reference. See "perldoc perlreftut" for an
    introduction how to handle references.

    jue


    Comment

    Working...