Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Array of variables

by Jenda (Abbot)
on May 29, 2013 at 11:17 UTC ( #1035819=note: print w/ replies, xml ) Need Help??


in reply to Re: Array of variables
in thread Array of variables

It's good to know though, that an object is a reference. This means that if $a is an object and you evaluate $b = $a; then both variables point to the same object and $a->Foo() is equivalent to $b->Foo();. Changing the value of $a doesn't change the value of $b though so if you later evaluate $a = new SomeObject('whatever'); then $a will refer to a different object than $b and $a->Foo() will no longer be equivalent to $b->Foo()!

Even if you do not use references and complex data structures yourself, it's good to understand this.

Jenda
Enoch was right!
Enjoy the last years of Rome.


Comment on Re^2: Array of variables
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1035819]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2015-07-29 19:20 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 (267 votes), past polls