On 5/10/07, Lionel MARTIN <[EMAIL PROTECTED]> wrote:
> There's really no difference in the way globals behave under mod_perl. > You just don't notice it under CGI because the process quits right > after the request has been served.
[...]
So, this clearly shows that the global variables sticks in memory, while the lexical one doesn't. So, I would imagine that after the script is run, space used by the lexical variable would be freed up.
That's what I'm telling you -- it won't be. The value will be gone, but the memory allocated to it will still be allocated to it. It won't be reused for other variables unless you undef $lexical. The other thing I was trying to explain is that the behavior of globals and lexicals is not affected by mod_perl. They behave the same way in any perl program. - Perrin