mendeepak has asked for the wisdom of the Perl Monks concerning the following question:
package a; sub new { my $class = shift; my $self = {}; bless $self,$class; return $self; } my $obj = new a (); $obj ->{$self}{avalue}=10; print $obj->{$self}{avalue};
please go through this code and will $self will get the avalue as its key at the end , i mean will it become $self={ avalue = value};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl oop concept
by tobyink (Canon) on Dec 04, 2012 at 07:07 UTC | |
|
Re: perl oop concept
by dsheroh (Monsignor) on Dec 04, 2012 at 10:16 UTC | |
by mendeepak (Scribe) on Dec 05, 2012 at 06:51 UTC | |
|
Re: perl oop concept
by DrHyde (Prior) on Dec 04, 2012 at 11:14 UTC | |
|
Re: perl oop concept
by locked_user sundialsvc4 (Abbot) on Dec 04, 2012 at 16:41 UTC |