John W. Krahn am Donnerstag, 9. März 2006 03.36:
> Hans Meier (John Doe) wrote:
[...]
> > my @array;
> > #or:
> > my @array=();

[v--- this sidenote is wrong]

> > (sidenote: the second form must be used in contexts where the code is
> > persistent/preloaded and used several times, to ensure that @array is
> > always empty when the next execution hits the code again. Of course only
> > *if* it should start empty and not accumulate between executions)
>
> Are you sure about that?

Not after realizing that 'my' is used. I was fixated to 
a) not forgetting a side note that could be annotated, as I did in one of my 
last posts
b) the initialisation part =(), having a situation in mind I just had before 
in a mod_perl context, where, in template code, a variable got not reset due 
to a missing =(). 
   But it was... an our variable.
   And against the "my variable closure phenomenon" the =() is also useless.

So again thanks for a hint and of course my above statement is wrong.

> Do you really understand what my() does? 

yes I think so. Generally, when all brain is present and working :-)

Hans

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to