in reply to Re: Help needed please: Data Manipulation in 2D Array
in thread Help needed please: Data Manipulation in 2D Array
Hi, I'd like to thank you for your fast repsonse.
In regards to your solution, I've refrained from using hashes because I have elements/keys that appear more than once and I need to include them all in my final output.
For example, in file 2, the first three lines, would have the same key and different values. example:
So what I would have to do, is find a way to create three lines from FILE 1, push these into a new 2D array, and then join the values to the keys,
so my new array will be.
index 0 - dog1=bird2=cat1=cat2
index 1 - dog1=bird2=cat1=cat9
index 2 - dog1=bird2=cat1=cat10
The reason I cannot use a hash is because in this case it would only create the first line:
index 0 - dog1=bird2=cat1=cat2
since hashes cannot have identical keys for different values.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Help needed please: Data Manipulation in 2D Array
by ikegami (Patriarch) on May 05, 2008 at 06:07 UTC | |
by Syntenty (Initiate) on May 05, 2008 at 06:53 UTC | |
by ikegami (Patriarch) on May 05, 2008 at 07:34 UTC | |
by Syntenty (Initiate) on May 05, 2008 at 08:04 UTC | |
by ikegami (Patriarch) on May 05, 2008 at 08:08 UTC | |
|