Hi javalsu
Your code (which I think should look like this)
my %htable;
$htable{"n", "g"} = 100;
It's an old fashioned, but still valid, way of treating a hash as if it is multidensional.
You could use this method to store values for all of the squares in a crossword puzzle for instance.
$row=1;
$col=1; $xwordgrid{$row,$col}='T';
$col=2; $xwordgrid{$row,$col}='E';
$col=3; $xwordgrid{$row,$col}='K';
$col=4; $xwordgrid{$row,$col}='T';
$col=5; $xwordgrid{$row,$col}='I';
$col=6; $xwordgrid{$row,$col}='P';
$col=7; $xwordgrid{$row,$col}='S';
You could then print out the crossword grid using a couple of loops.
It's more usual now to use nested hashes and things, but they're a bit clever for me.
Mike
The options are: fast, cheap and right - pick any two.
![[orientalbow] [orientalbow] [orientalbow]](/data/assets/smilies/orientalbow.gif)
&
Want great answers to your Tek-Tips questions? Have a look at faq219-2884