in reply to Re^4: Help extracting pattern of data
in thread Help extracting pattern of data
My data is incremental so the same content with different values get appended to __DATA__ over time.
I'm guessing a bit here, but it sounds like you will wind up with an Array-of-Hashes structure (see perldsc). If so, and building on davido's JSON code, try something like (untested):
my @fields = qw(latestTime eCompressed eUncompressed iCompressed iUnco +mpressed); for my $i (0 .. $#$structure) { my $hr_record = $structure->[$i]; print qq{record $i: }; for my $field (@fields) { print qq{$field is $hr_record->{$field}, }; } print qq{\n}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Help extracting pattern of data
by spikeinc (Acolyte) on Jan 27, 2014 at 05:11 UTC | |
by spikeinc (Acolyte) on Jan 27, 2014 at 08:17 UTC | |
by spikeinc (Acolyte) on Jan 27, 2014 at 08:36 UTC |