my $obj = {}; bless $obj, "Foo"; $obj->{A}{B}{C} = "this is a C"; print $obj->C; # outputs "this is a C"