my @arr; my @subArr; my %hash = (); my %hash2 = (); $hash{key} = 12; $hash{pl} = 1; $hash{lop} = 9; $hash2{key} = 12; $hash4{pl} = 1; $hash8{lo} = 9; push(@subArr, \%hash); push(@subArr, \%hash2); push(@arr, \@subArr); #### for my $i (0 .. $#arr){ $subd = $arr[i]; print"subLen: ".$subd."\n"; for my $j ( {{$arr[i]}} ) { foreach my $key{ keys %{$j}}{ print $key.": ".${$j}}{$key}; } { } } #### while ($element = shift(@numOfWordArr)) { $termsFreq{$element} ++; if(!exists($docTerms{$element})) { $docTerms{$element}++; } } #### push(@docArray, \%termsFreq); #### push(@classArr, \@docArray); #### for my $i($#classArr) { print "subArr_ref: ".@{$classArr[$i]}."\n"; for my $hashRef(@{$classArr[$i]}) { print "hashRef: ".$hashRef."\n"; for my $key (sort keys %$hashRef) { print $csv $key."-- ".$hashRef->{$key}.","; } # foreach my $feat(@featureVector) { # print $csv $hashRef->{$feat}.","; # } print $csv $i."\n"; } }