use strict; use warnings; { print "This is the original approach, reusing \$attrHash\n"; my $result = []; my $attrHash = {}; for( 1..5 ) { print $attrHash, "\n"; push( @$result, $attrHash ); } } { print "This uses a new hash each time through the loop\n"; my $result = []; for( 1..5 ) { my $attrHash = {}; print $attrHash, "\n"; push( @$result, $attrHash ); } } __END__ This is the original approach, reusing $attrHash HASH(0x2254c8) HASH(0x2254c8) HASH(0x2254c8) HASH(0x2254c8) HASH(0x2254c8) This uses a new hash each time through the loop HASH(0x225504) HASH(0x225534) HASH(0x225324) HASH(0x2254e0) HASH(0x183c1d0)