On 5/10/07, Lionel MARTIN <[EMAIL PROTECTED]> wrote:
So, to sum up, if I have got 10 different scripts in a mod perl environment (let's call them test1.pl....test10.pl), and using lexical variables there. If I first run test1.pl and then, run test2.pl, the only way for test2.p to get access to the memory used by test2.pl is freeing up test1.pl lexical variables, by undefining them?
Yes.
And what if I run test1.pl twice without undefining its lexical variables? Will the same memory space be used twice, or will each call use different memory space (I'm talking here about situation where the same Perl interpreter is running the script twice in a mod perl environment)?
It will reuse the already allocated memory. And the second pass is faster because the memory is already allocated. - Perrin