in reply to inserting a list into an array
but the results that I am getting is that the valuse are added to the right block, but at the end of the list of vertex, instead of into the right position and the rest shifted.
Do you have warnings enabled (either using -w or use warnings; )? It might be that $it2 + 1 is equal to the length of the array or more than that. If it is offset more than the length of the array, perl will issue a warning and then splices at the end of the array. e.g.,
use Data::Dumper; use warnings; use strict; my @foo = ( 0,1,2,3,4,5 ); splice (@foo,78,0,(7,8)); print Dumper \@foo;
-enlil
|
|---|