I've created an array of anonymous hashes
to act as structures to hold data from some files
I'm working on parsing.
For various reasons, I need to add an element
into the middle of the array that is the same
as the one before it except for some minor
I'd been doing this with:
my $new_element = $hash_array[$index];
Of course, I've noticed that this just
makes $new_element a reference to the same
What is the best way to make $new_element
be a reference to an anonymous hash with
the same data as the anonymous hash in
, so that I may
splice it in?
(Side question: When using splice and
replacing a run of 0 length, are new elements
put at the offset position, or after?)
Thanks in advance, wise Monks.