http://www.perlmonks.org?node_id=674543


in reply to Re: Pseudo-hashes & Hashes
in thread Pseudo-hashes & Hashes

Only the first -> is necessary. I would write it as

$server->{cmds}[$i]{status}

But i concur with your point, in general its easier to understand the -> style, as it reduces the possible meanings of $$ in your code (it has multiple meanings which depend on what follows, sometimes quite far after). In fact some people even avoid using bare scalar dereferencing on simple scalars just to avoid having $$ in their code. So they write ${$scalar_ref} instead of $$scalar_ref. (Im not in this camp personally).

---
$world=~s/war/peace/g