Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Answer: Is it possible to do pass by reference in Perl?

( #167482=categorized answer: print w/ replies, xml ) Need Help??

Q&A > subroutines > Is it possible to do pass by reference in Perl? contributed by RedDragon

It is possible to pass by reference in perl. The argument list u get inside ur subroutine via @_ are implicit reference to values that were passed in from inside from outside.i.e. if u pass in a list of strings, inside the body of the sub,change those strings,then they will be modified outside the subroutine.
sub ted { my($add,$sub,$mul) = @_; ... .. }

Comment on Answer: Is it possible to do pass by reference in Perl?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (13)
As of 2015-07-07 13:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls