You can use splice. Here is an example:
use Modern::Perl; my @nums = qw( 1 2 3 4 5 6 ); say @nums; splice( @nums, 3, 0, "combo breaker" ); say @nums;
Output:
123456 123combo breaker456
In reply to Re: Insert Element Into Array
by frozenwithjoy
in thread Insert Element Into Array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |