use strict; use warnings; use Data::Dumper; my $parray = [ qw( a b c ) ]; printf "Array before change is: %s\n", Dumper($parray); my $phash = { 'array' => $parray, }; printf "Hash before change is: %s\n", Dumper($phash); push @$parray, 'd', 'e', 'f'; printf "Array after change is: %s\n", Dumper($parray); printf "Hash after change is: %s\n", Dumper($phash); #### Array before change is: $VAR1 = [ 'a', 'b', 'c' ]; Hash before change is: $VAR1 = { 'array' => [ 'a', 'b', 'c' ] }; Array after change is: $VAR1 = [ 'a', 'b', 'c', 'd', 'e', 'f' ]; Hash after change is: $VAR1 = { 'array' => [ 'a', 'b', 'c', 'd', 'e', 'f' ] };