in reply to Re^8: Adding hashes to already existing array
in thread Adding hashes to already existing array

I'd like to see the code you end up with. There's been a lot of scratch, so once you're done and have things working, reply to this thread with your code. We're not a review service (typically), but in this case, I'm curious.
  • Comment on Re^9: Adding hashes to already existing array

Replies are listed 'Best First'.
Re^10: Adding hashes to already existing array
by ExReg (Priest) on May 07, 2016 at 00:07 UTC

    The code I have is part of a larger system with lots of arrays and lots of data, and I'm afraid I have no way of getting it off and showing it. The code that I was using was the same as my first reply to you only with the variable names changed to protect the innocent. The results were also the same as in my reply with the data values also changed.

    I was interested in preserving the contents of the array, so I was trying not to destroy the data in it. That is why I was trying such unholy constructs. Looking at the answers that I received, I think that I will go with the ideas suggested by haukex and poj where I change the string value in the array into some hashes. It will require a little refactoring of places that access @excerpts (not its real name). To get the string contents, it will have to access $excerpts[$i]{content} instead of $excerpts[$i]. But it will now be possible to access $excerpts[$i]{fpart} and $excerpts[$i]{bpart} as well.