Because memory allocation and freeing is handled by perl automatically for you. | [reply] |
There is! You can get memory as a scalar, an array, or a hash. Like so: my $scalar;
my @array;
my %hash;
That memory is dynamic and managed by perl itself, so you don't need to remember to free it (usually) and you don't need to remember how much memory to allocate. Great isn't it! | [reply] [d/l] |
Yes, for sure. But please keep in mind that in case of complex data structures some circular references are not detected properly. In this case memory will still remain allocated.
| [reply] |
Who wants to worry about allocating memory when there are bigger problems to handle? As others have already stated, Perl does the allocating for you. This lets you think about the logic of the program and such.
And you didn't even know bears could type.
| [reply] |