in reply to Re^3: Adding hashes to already existing array
in thread Adding hashes to already existing array
I apologize. I do use strict and warnings. That and any typos I have are because I do not have perl on this system and have to look at the other system where I test it to type it here.
I would agree that the syntax I have is not what I want. As I mentioned in my reply to stevieb, a normal AoH syntax would have been better.
If I understand what you have, you get the strings into $excerpts[$i], then replace those strings with hashes in the
step. This unfortunately gets rid of the original string in each array element. I could get around this by doing$excerpts[$i] = { fpart=>$1, bpart=>$3 };
if I first get the content into $value before overwriting it.$excerpts[$i] = { fpart=>$1, bpart=>$3, content=>$value };
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Adding hashes to already existing array
by poj (Abbot) on May 06, 2016 at 20:26 UTC | |
|
Re^5: Adding hashes to already existing array
by haukex (Archbishop) on May 06, 2016 at 20:32 UTC | |
by ExReg (Priest) on May 06, 2016 at 20:35 UTC | |
by stevieb (Canon) on May 06, 2016 at 20:50 UTC | |
by ExReg (Priest) on May 06, 2016 at 21:40 UTC | |
by stevieb (Canon) on May 06, 2016 at 23:12 UTC | |
by stevieb (Canon) on May 06, 2016 at 23:19 UTC | |
|