in reply to Re^3: Minimize Hash Key Value Combinations
in thread Minimize Hash Key Value Combinations
i dont agree.. just take a look at Hash::Multikey or perldsc or maybe it is a nested structure like this:keys are strings never arrays
furthermore thats offtopic :)#!/usr/bin/perl -w use strict; use warnings; my %hash; $hash{'number'}{'even'} = [24, 44, 38, 36]; $hash{'number'}{'odd'} = [23, 43, 37, 35]; foreach my $i(keys %hash){ print $i; foreach my $j(keys %{$hash{$i}}){ print "\t".$j."\t"; print join(" ",@{$hash{'number'}{$j}})."\n"; } }
|
|---|