Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: passing arrays to subroutines

by QM (Parson)
on Mar 16, 2005 at 14:36 UTC ( #439954=note: print w/replies, xml ) Need Help??

in reply to Re: passing arrays to subroutines
in thread passing arrays to subroutines

There are two ways of passing data to a subroutine:

- call by value
- call by reference

Actually, there's also:

- call by name
- call by copy-restore
- call by result
- call by push value
- call by need
- call by macro expansion

See Parameter (Computer Science) on Wikipedia.

Most (all?) of these can be done in Perl. In Perl, it really comes down to two things:

1) Parameters are passed as a list of scalars.
2) The caller and the callee have to agree on what those scalars mean.

Quantum Mechanics: The dreams stuff is made of

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://439954]
[Discipulus]: planetscape welcome back! (or is well comeback?)
[Discipulus]: fore every 2 good old monks that come back, we will accept 1 clinical
[planetscape]: Might be "well, come back!" Discipulus ;-)
[stonecolddevin]: that's a 2.0 k/d ratio, i'll take it
[choroba]: #cbstream still down?
[erix]: yeah, annoying
[choroba]: last ambrus: 1 week ago :-(
[erix]: let's invade Hungary
[planetscape]: darn

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2017-06-22 21:02 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (530 votes). Check out past polls.