From: "West, William M" <[EMAIL PROTECTED]> > i tried for the longest time to get something like > the following to work:: > > foreach $section (keys %board){ > > for my $a (1..19){ > for (1..19){ > $board->{"Q1S1"}->[$a]->[$_] and print "\n$a $_"; > ... > } > } > } > > > well, it is supposed to repeat the inner loops several times over > right? for each hashkey, do the following.... etc etc.. > > if i got rid of the "foreach $section (keys %board){" > the rest would work fine. I was about to yell at you guys about it > when, out of desperation, i tried one last thing : > > my $board = \%board; #first line in the whole thing > > and it WORKS!!!! > > > It turns out that a reference to a hash that's created on the 'spur of > the moment' and not explicitly made to refer to a %HASH doesn't work > the same way as a real hash :P
If only you had use strict; on top of your script ... To access the key 'foo' in hash %board you are supposed to use $board{foo}, $board->{foo} accesses the 'foo' key in the hash referenced by scalar $board. Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]