in reply to Array splice
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Array splice
by AnomalousMonk (Archbishop) on Aug 30, 2013 at 16:28 UTC | |
|
Re^2: Array splice
by code-ninja (Scribe) on Aug 30, 2013 at 07:27 UTC |