I'm not sure that quite works. In theory, on the first call, my $foo = "blah" should be run, then go out of scope at the end of the function call. So, if the declaration/assignment is not run on the second call, shouldn't $foo ||= "FOO" give us an error?
In reply to Re: Re: static-like persistence of my variable due to trailing conditional
by DamnDirtyApe
in thread static-like persistence of my variable due to trailing conditional
by meonkeys
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |