RE: array of hashes looping prob

2004-10-04 Thread Charles K. Clarkson
From: Graeme McLaren wrote: : Ok everyone I got it: : : for my $a (@result){ : : for my $h (keys %$a){ : : print "$h = $a->{$h} "; : } : } Avoid using $a and $b as variables. They are used by 'sort' and treated special by perl. Use descriptive var

RE: array of hashes looping prob

2004-10-04 Thread Graeme McLaren
Ok everyone I got it: for my $a (@result){ for my $h (keys %$a){ print "$h = $a->{$h} "; } } Cheers, G :) From: "Graeme McLaren" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: array of hashes looping prob Date: Mon, 04 Oct 2004 10:27:37 +0100 MIME-

array of hashes looping prob

2004-10-04 Thread Graeme McLaren
Hey all I'm stuck looping through an array of hashes, here is what I have: ## for my $a (@result){ for my $h (keys %$a){ $tst = "$h->{$a}"; } } ## @result contains a hashes, I can die it out ok... there is something wrong when I try looping and ass