Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by RedDragon (Initiate)
on May 18, 2002 at 08:49 UTC ( #167482=categorized answer: print w/replies, xml ) Need Help??

Q&A > subroutines > Is it possible to do pass by reference in Perl? - Answer 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) = @_; ... .. }

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[ELISHEVA]: fancy that - a title that actually describes the problem :-)
[ELISHEVA]: but actually thanks for the reminder
[Discipulus]: DBI::CSV + utf8 = BOO?M
[erix]: in extremis we tend to forget stuff ;)
[ELISHEVA]: \Disciplus : lol
[Discipulus]: and ELISHEVA we waait one your post since ~2years... ;=)
[ELISHEVA]: has it really been that long?
[Discipulus]: it seems..
[Discipulus]: more: just one thread in the last ~5 years

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-05-28 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?