#!/usr/bin/perl use Data::Dumper; $Data::Dumper::Indent = 1; my (@item, %xyz); $item[1] = 'some key'; $item[3] = [ qw(foo bar quux) ]; push # push to an array - which is @{ # a dereferenced anonymous array which lives $xyz{ # in the hash %xyz, under the key stored in $item[1] # element 2 of the array @item } # inside that keys value which is an {is} # anonymous hash, there under the key 'is' }, # - push to that array - @{ # the contents of an anonymous array $item[3] # stored as element 4 in the array @item }; print Data::Dumper->Dump([\%xyz] , [qw( xyz )]); print Data::Dumper->Dump([\@item], [qw( item )]); __END__ $xyz = { 'some key' => { 'is' => [ 'foo', 'bar', 'quux' ] } }; $item = [ undef, 'some key', undef, [ 'foo', 'bar', 'quux' ] ];