I don't recommend this, but just so you can see how you can do it:
I'll leave handling the HASH case as your excercise. ;)for (sort keys %hash) { print "$_ => "; if (ref($hash{$_}) eq 'ARRAY') { print join(', ', @{ $hash{$_} }); } elsif (ref($hash{$_}) eq 'HASH') { # do something else } else { print $hash{$_}; } print "\n"; }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: Complex hash?
by jeffa
in thread Complex hash?
by tamaguchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |