I have a three columns Excel file,which has the following pattern
12 A P1 23 B P5 24 C P2 15 D P1 06 E P5
The structure underlying this data set is that,
P1 contains A and D; A corresponds to 12 and D corresponds to 15
P2 contains C; C corresponds to 24
P5 contains B and E; B corresponds to 23 and E corresponds to 06
I want to represent this kind of structure in a hashed structure i.e., use P1 as a key to point to a hash, and A is used as the key for this second level hash. Is there a way to implement this in Perl?
Spreadsheet::ParseExcelcan be used to parse.xlsfiles. Below is a sample program that builds the desired data structure.Output