Don't ask to ask, just ask | |
PerlMonks |
ptkdb: 'my' variable in sub retains value between callsby leonidlm (Pilgrim) |
on Aug 10, 2008 at 15:27 UTC ( [id://703426]=perlquestion: print w/replies, xml ) | Need Help?? |
leonidlm has asked for the wisdom of the Perl Monks concerning the following question:
Hi all again :) How much things you can lern by using ptkdb! I am running a big perl program with this beautiful debugging module and I noticed something I want someone here to clarify for me: When I declare a sub routine and there I write: If I run this subroutine couple of times the $b value is saved from call to call !!!! How can it be? I am using a "my" declaration, it should be cleared as fast as the subroutine will end! Someone please help me to understand this perl's behavior.
Back to
Seekers of Perl Wisdom
|
|