
multi-dimensional arrays with hashes help please
Re: multi-dimensional arrays with hashes help
Chris> Now, I know this code will not work:
Chris> $founddata[0]{'name'}='Chris';
Chris> $founddata[0]{'age'}='27';
Chris> $founddata[1]{'name'}='Fred';
Chris> $founddata[1]{'age'}='Fred';
$founddata{0}{name} = ...
and so on.
Then you can double walk the hash keys.
foreach $index ( keys %founddata ) {
foreach $attr ( keys %{$founddata{$index}} ) {
print "$index $attr $founddata{$index}{$attr}\n";
}
}
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien. | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email: