in reply to Re: Strange memory growth?
in thread Strange memory growth?
The "my" operator declares the listed variables to be lexically confined to the enclosing block, conditional ("if/unless/elsif/else"), loop ("for/foreach/while/until/continue"), subroutine, "eval", or "do/require/use"'d file.As can be seen:
The scoping rules work as they should, but the memory usage could definitely be more conservative.502 $ perl -we'use strict;if(1){my $foo="foo"};print $foo' Global symbol "$foo" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.
edit: beaten
|
|---|