http://qs321.pair.com?node_id=469167


in reply to Re^4: Array of hashes reference problem
in thread Array of hashes reference problem

Check this code; The code posted goes in an infinite loop.
#!/usr/bin/perl -w use strict; my @arrayAoH; my $out = "First one: one Second one: second"; my ( $i,$j ); my ($key,$value); my @discovered = split /\n/, $out; $i = 0; # i holds the line number of the input (@discovered) array. $j = 0; # j holds the number of the table row. until ($i > $#discovered){ ($key, $value) = split /:\s*/, $discovered[$i]; $arrayAoH[$j]{$key} = $value; $i++; }
Hope it helps! Good Luck!