in reply to array pushing
thats all this is doing..lets say we have this$hello[1] = 'hi';
so $#second starts out as 2 (the number of elements in $second starting from zero) so the ++$#second is saying start at 3. So during the first loop its basically sayingmy @first = qw/one two three/; my @second = qw/four five six/; for $value(@first){ $second[++$#second] = $value; }
so we're appending the elements of @first to @second, which in the end will contain 'four five six one two three' in my example..an easier way would have been to just do$second[3] = $value;
but i guess the docs were trying to make a point (too lazy to go look for myself (: )..anyway, hope this helps clear things up a bit for youpush(@second, @first);
|
|---|