for my $prod ( @total_pid ){ for my $sup ( @total_sup ){ print "$rowhash{$prod}{$sup}{DATA_F}, $rowhash{prod}{$sup}{DATA_S}\t"; } print "\n"; }