in reply to Re: Death to Dot Deref
in thread Death to Dot Deref
This sort of behaviour already occurs after the variable is resolved, as in:my $foo = {}; $foo{x} = "Bar"; # Auto-dereference $foo->{x} = "Bar"; # Manual dereference
Under C/C++, there is a huge difference between an object reference, an object pointer, and a stack object. In Perl, though, you could hardly care less where the object is as Perl should be able to figure it out for you.$foo->{y}->{z} = "Zoinks"; print "$foo->{y}{z}"; # Perl5 Auto-dereference
|
|---|