Link to home
Start Free TrialLog in
Avatar of noodny
noodny

asked on

build hash of hashes of hashes ...

I have a file:

pkgName           uuName      tid      status      date1         date2
---------------         ---------      -----      --------      -----------      -----------  
PWCT001584        ve00208      NULL      Closed      20040805      20040805
PWCT001585        ve00208      NULL      Closed      20040805      20040805
PWJR001942        ve00208      NULL      Closed      20040806      20040806
PWJR002109        ve00208      NULL      Closed      20040618      20040618
PWXX001942        ve00208      NULL      Closed      20040806      20040806
PWXX002109        ve00208      NULL      Closed      20040618      20040618
PWCT001584        ve00208      NULL      Closed      20040805      20040805
PWCT001585        ve00208      NULL      Closed      20040805      20040805
PWJR001942        ve00208      NULL      Closed      20040806      20040806
PWJR002109        ve00208      NULL      Closed      20040618      20040618
PWXX001942        ve00208      NULL      Closed      20040806      20040806
PWXX002109        ve00208      NULL      Closed      20040618      20040618
PWXX002110        ve00208      NULL      Pending      20040618      20040618
PWCT001584        au00208      NULL      Closed      20040805      20040805
PWCT001585        au00208      NULL      Closed      20040805      20040805
PWJR001942        au00208      NULL      Closed      20040806      20040806
PWJR002109        au00208      NULL      Closed      20040618      20040618
PWXX001942        au00208      NULL      Closed      20040806      20040806
PWXX002109        au00208      NULL      Closed      20040618      20040618
PWXX002110        au00208      NULL      Pending      20040618      20040618

I need to build a hash containing counts for each uuName, for each group of
packages (where $pkgGroup = substr($pkgName, 0, 4)) for each status, ie.
$pkgCounts{'ve00208'}{'PWCT'}{'Closed'} should return 2
$pkgCounts{au00208}{'PWXX'}{'Pending'} should return 1 ...

This is done in a subroutine. $pkgCounts  is then returned to main for referencing
ASKER CERTIFIED SOLUTION
Avatar of kandura
kandura

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of noodny
noodny

ASKER

Thank u very much, kundura.