waytoperl has asked for the wisdom of the Perl Monks concerning the following question:
Hello Masters,
I've been trying to come up with a logic for a problem, that im not able to figure out flow diagram. Its been 2 days. I really seeking help.
Task: I have a hash table which i created from csv file. Using hash table keys/values, need to replace certain blocks. In csv file there is repetition data in column 2. Column 2 is referred as Hash->values. Need to replace certain a set of logic to each repetitive data.
Example:
Column1: set of names_random, defined as {name1, name2, name3, name4,.....name200}
Column2: groups column1 data belong to, defined as {group1, group2, group1, group4, group2, group7, group4....group5}
Each data of column1 is associated to a group in column2.
Since these data are stored in hash table, what is the good logic to read column2 and place certain bunch of logic.
I'm trying to figure out and confused like do i need to store hash table and create a subroutine to read hash data from a file and access hash->values by pattern matching, if pattern matches replace these logic by entering to for loop or while loop.
I dont know where to start from. Please help by providing feedback through good way to implement logic.
Thanks in advance.
|
|---|