Kevin Butters wrote: > > A real beginner here. > > I have an array with 5 elements, 0-4. I want to insert > values into the array at position 2. Do I use the > splice command?
Yes. > splice(@array, 1, "value"); > print "@array\n"; > 0 1 2 3 4 5 $ perl -le'$,=$"; @array = (0 .. 4); print @array; splice @array, 2, 0, "value"; print @array; ' 0 1 2 3 4 0 1 value 2 3 4 John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]