Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You are correct Fastolfe, the re-allocation happens in
the loop. However, this is the behavior that is GOOD.
The cost of the allocation is a great deal less than this
In the end, when you do a "-w" and it complains that '$x won't stay shared' or something at the second my, your lesser perl wizard is likely to take the "my" off since the variable is already declared. Ouch. In the end, you suffer the cost of extra work on the backside to protect yourself from the future. -- In reply to RE: Re: redeclaring variables with 'my'
by extremely
|
|