lmtaylor has asked for the wisdom of the Perl Monks concerning the following question:
If I am to concatenate two elements of an array, will the index numbers assigned to the array elements update? In other words, if I were to run this code:
@array = (1..10);
$array[7] = $array[7] . $array[8];
My array now has the following elements:
1
2
3
4
5
6
78
9
10
Is the index of 9 still $array[9]? Or has it been bumped up to $array[8] since the number that was in $array[8] has been concatenated with $array[7]?
I've tried searching for this online, but couldn't find anything...maybe I'm using incorrect terminology?
Thanks a lot!
- Lisa
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Concatenating Array elements
by davido (Cardinal) on Aug 19, 2014 at 20:46 UTC | |
Re: Concatenating Array elements
by muba (Priest) on Aug 19, 2014 at 20:39 UTC | |
Re: Concatenating Array elements
by johngg (Canon) on Aug 19, 2014 at 22:36 UTC | |
Re: Concatenating Array elements
by frozenwithjoy (Priest) on Aug 19, 2014 at 20:47 UTC | |
by wilmer_t (Novice) on Aug 19, 2014 at 21:54 UTC | |
by soonix (Canon) on Aug 20, 2014 at 07:13 UTC | |
Re: Concatenating Array elements
by Laurent_R (Canon) on Aug 19, 2014 at 21:13 UTC | |
Re: Concatenating Array elements
by lmtaylor (Novice) on Aug 20, 2014 at 19:27 UTC |
Back to
Seekers of Perl Wisdom