D
Deepu
Hi All,
How to print hash of array of arrays without using Data:umper.
I am trying to print
%hash = (
FILE1 => [
[
STATE1
STATE2
STATE3
],
[
STATEX
STATEA
STATE4
]
],
FILE2 => [
[
STATE2
STATE5
],
and so on.
I tried:
foreach my $key (sort keys %hash) {
print "$key\n"; ## - It prints the file names correctly as keys
for $i (0 .. $#{$hash{$key}}) {
print "$i: $hash{$key}[$i]";
}
}
But now i get output like:
0: ARRAY(0x5fdbf0)
and so on.
Please help me on this.
Thanks
Deep
How to print hash of array of arrays without using Data:umper.
I am trying to print
%hash = (
FILE1 => [
[
STATE1
STATE2
STATE3
],
[
STATEX
STATEA
STATE4
]
],
FILE2 => [
[
STATE2
STATE5
],
and so on.
I tried:
foreach my $key (sort keys %hash) {
print "$key\n"; ## - It prints the file names correctly as keys
for $i (0 .. $#{$hash{$key}}) {
print "$i: $hash{$key}[$i]";
}
}
But now i get output like:
0: ARRAY(0x5fdbf0)
and so on.
Please help me on this.
Thanks
Deep