As TGI says: "Perl variables will grow as needed. " There is a lot contained in that statement. Unlike C, perl is a dynamic language. It keeps track of memory allocations for you. You rarely need to worry about it. All data types, whether scalars, arrays or hashes will have their memory allocated dynamically and will grow as needed. Perl even moves the storage around as needed when the item outgrows its allocated block and need a larger contiguous block.
In reply to Re: memory for array
by starbolin
in thread memory for array
by vit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |