my @officialannotation = []; my @prodigalannotation = []; #### %findgene = ( "start" => $offcordinates[1], "stop" => $offcordinates[0] ); $hash_ref = \%findgene; #### $hash_ref = { "start" => $offcordinates[1], "stop" => $offcordinates[0] }; #### @officialannotation = []; push @officialannotation, $hash_ref; #### @officialannotation = ( [], $hash_ref ); #### for $hash_ref ( @$officialannotation ) { while (my $start, $stop) = each %$hash_ref ) { for $hash_ref2 ( @$prodigalannotation) { while (my $start1, $stop2) = each %$hash_ref2 ) {