http://qs321.pair.com?node_id=571088


in reply to Re: Perl 5.9.4 released
in thread Perl 5.9.4 released

Kind of. When you say sub foo {my $bar}, perl doesn't actually allocate a new variable every time you execute foo. Instead, it just clears the value. When you say state $bar it doesn't do that either. (This gets into the variable/value split, which is generally not talked about much in perl5-land. Suffice it to say, I did mean to say "variable" and "value" when I did.)


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).