Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Making a variable in a sub retain its value between calls

by crashtest (Curate)
on Apr 19, 2005 at 16:39 UTC ( [id://449324] : note . print w/replies, xml ) Need Help??


in reply to Re: Making a variable in a sub retain its value between calls
in thread Making a variable in a sub retain its value between calls

Thanks for the catch! I'm not initializing the variable in my actual code, and only set $memory = 0 in my post on a whim. But it illustrated a subtlety I would have probably missed on my own. And your comment seems to have sparked a lively and interesting debate on BEGIN vs. INIT blocks.