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


in reply to Complex Data Structure Suggestions Wanted

You don't need the exists test; perl will autovivify to DWYM, so the first branch of your test actually works for both conditions. And if you want to use "indirect" (arrow?) notation, then:

push @{$HashRef->{$ItemID}}, $DataSource;
BTW, I could be all wrong on this, but I think that the term "indirect notation" is typically used to refer to stuff like
my $obj = new Thingie;
as opposed to
my $obj = Thingie->new();

the lowliest monk