Well, if you just say
my @array; $array[12] = 5;
Perl silently assumes that you mean what you say and allocates sufficient memory to satisfy your wishes. (This has the potential downside that it allocates lots of memory and copies lots of data around if you are not careful.)
Why do you refer to strcpy in your example? As far as I remember this copies strings and not arrays in C?
In reply to Re: Array splice
by hdb
in thread Array splice
by code-ninja
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |