Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

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


in reply to Is it possible to do pass by reference in Perl?

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
Node Status?
node history
Node Type: note [id://167482]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2021-05-09 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (100 votes). Check out past polls.

    Notices?