x y z a b c e f g h i j #### x y z # a b c <- inserted element in position 0 e f g h i j #### for my $rc(@R) { if ($rc->[0] eq "a") { splice @R, 0, 0, '#'; print "$rc->[0]\t","$rc-[1]\t","$rc->[2]\t","$rc->[3]\n" } } #### x y z a b c a b c a b c a b c . .