I always found the code to do this WITH a loop quite funny in fact:
my $work = \$hash; $work = \$$work->{$_} for @a; $$work = 1;
I always found the code to do this WITH a loop quite funny in fact:
my $work = \$hash; $work = \$$work->{$_} for @a; $$work = 1;