c:\@Work\Perl\monks>perl -wMstrict -MData::Dumper -le "sub foo { ;; my @this_array; my %this_hash; ;; foreach my $something (0 .. 4) { ;; push(@this_array, $something); ;; my $key = $something + 1000; $this_hash{$key} = \@this_array; ;; @this_array = (); ;; } ;; return(\%this_hash); } ;; my $hash_ref = foo(); print Dumper $hash_ref; " $VAR1 = { '1002' => [], '1001' => $VAR1->{'1002'}, '1004' => $VAR1->{'1002'}, '1000' => $VAR1->{'1002'}, '1003' => $VAR1->{'1002'} };