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};
In reply to perl oop concept by mendeepak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |