use strict; use warnings; my %struct = (data => 1, pointers => []); print "Data is $struct{data}.\n"; print "There are ", scalar @{$struct{pointers}}, " pointers allocated.\n"; push @{$struct{pointers}}, "hello world", "the end is neigh", "this is the end"; print "$_\n" for @{$struct{pointers}}; print "There are ", scalar @{$struct{pointers}}, " pointers allocated.\n";