in reply to Array in a Hash

I would organize the data slightly differently. See also use strict and warnings and perldsc:
use warnings; use strict; use Data::Dumper; # Populate Array my @fruits = qw( Apple pear Bananna Peach ); # Populate Hash, using a reference to the array my %fruit = ( total => 248, fruit => \@fruits ); # Next Fruit to be added my $new_fruit = "Grapes"; push @{ $fruit{fruit} }, $new_fruit; #print Dumper(\%fruit); # Print out Total fruit and list fruit print "There are $fruit{total} pieces of fruit. "; print "The following is a list of the fruit \n"; for ( @{ $fruit{fruit} } ) { print "$_ \n"; } __END__ Actual output ============= There are 248 pieces of fruit. The following is a list of the fruit Apple pear Bananna Peach Grapes