Does perl support in/out parameter subroutine?

Discussion in 'Perl' started by Hon Seng Phuah, Mar 5, 2004.

  1. 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.
    Hon Seng Phuah, Mar 5, 2004
    #1
    1. Advertising

  2. Hon Seng Phuah wrote:
    > 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.


    "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
    Jürgen Exner, Mar 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hemant Shah

    Breaking out of nested subroutine?

    Hemant Shah, Jul 29, 2004, in forum: Perl Misc
    Replies:
    30
    Views:
    683
    David Combs
    Aug 7, 2004
  2. Stan Brown
    Replies:
    1
    Views:
    120
    Billy N. Patton
    Sep 29, 2004
  3. muzzaman
    Replies:
    3
    Views:
    333
    Brian McCauley
    Jun 8, 2005
  4. king
    Replies:
    5
    Views:
    178
  5. Replies:
    1
    Views:
    80
    Mumia W.
    Oct 18, 2007
Loading...

Share This Page