in reply to Pass by value acts like pass by reference
Thank you for the reply but I think you missunderstood my question. I passed by value, a flattened list of key value pairs, but after the transformation of the temporary hash in the sub, the hash outside the sub reflects the changes. I've been thinking further though and think what may be happening is that what is passed to the sub is a array reference. And inside the sub, 1 is pushed onto this array, which is the same array contained in the hash outside the sub. So thats why the change is noted (I think). Is this correct?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Pass by value acts like pass by reference
by demerphq (Chancellor) on Jul 11, 2004 at 19:30 UTC | |
by Anonymous Monk on Jul 12, 2004 at 20:12 UTC | |
Re^2: Pass by value acts like pass by reference
by tilly (Archbishop) on Jul 11, 2004 at 16:43 UTC |
In Section
Seekers of Perl Wisdom