@foo = qw[1 2 3 4 5]; should transform into a hash that looks like this $bar->{1}{2}{3}{4}{5} = undef;