in reply to Hash of Hash of Arrays
There is no example how your input looks like. It's difficult to figure out how it should be done.
Below is short example of how data can be processed:
which has the following data:#!/usr/bin/perl use strict; use warnings; use Data::Dumper; $Data::Dumper::Sortkeys = 1; $Data::Dumper::Terse = 1; my $hash = {}; foreach my $line ( <DATA> ) { chomp $line; my ( $jira, $program, $rev, $reviewer, $desc ) = split /:/, $line; my $data = { JIRA => $jira, Program => $program, rev => $rev, Reviewer => $reviewer, Description => $desc, }; push @{ $hash->{ $program }}, $data; } print 'hash = ' . Dumper( $hash ); __DATA__ COM-6789:Testing:r876391:Balise Mat:Audited COM-6789:Testing:r698392:Chan Joe:SO hwat COM-6789:Testing:r327896:Chan Joe:Paid the Due COM-1234:Development:r345676:John Wick:General fix COM-1234:Development:r909276:None:Updating Received
hash = { 'Development' => [ { 'Description' => 'General fix', 'JIRA' => 'COM-1234', 'Program' => 'Development', 'Reviewer' => 'John Wick', 'rev' => 'r345676' }, { 'Description' => 'Updating Received', 'JIRA' => 'COM-1234', 'Program' => 'Development', 'Reviewer' => 'None', 'rev' => 'r909276' } ], 'Testing' => [ { 'Description' => 'Audited', 'JIRA' => 'COM-6789', 'Program' => 'Testing', 'Reviewer' => 'Balise Mat', 'rev' => 'r876391' }, { 'Description' => 'SO hwat', 'JIRA' => 'COM-6789', 'Program' => 'Testing', 'Reviewer' => 'Chan Joe', 'rev' => 'r698392' }, { 'Description' => 'Paid the Due', 'JIRA' => 'COM-6789', 'Program' => 'Testing', 'Reviewer' => 'Chan Joe', 'rev' => 'r327896' } ] }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash of Hash of Arrays
by voltas (Novice) on Aug 25, 2016 at 10:06 UTC | |
by duyet (Friar) on Aug 26, 2016 at 10:37 UTC | |
by voltas (Novice) on Aug 26, 2016 at 14:54 UTC | |
by duyet (Friar) on Aug 27, 2016 at 05:22 UTC | |
by voltas (Novice) on Aug 29, 2016 at 06:41 UTC | |
|