in reply to Re^4: Array of hashes reference problem
in thread Array of hashes reference problem
Hope it helps! Good Luck!#!/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++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Array of hashes reference problem
by tlemons (Novice) on Jun 22, 2005 at 21:30 UTC |