Does perl support in/out parameter subroutine?

H

Hon Seng Phuah

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

Jürgen Exner

Hon said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top