Declaring a variable twice isn't an error, just unnecessary
Declaring a variable twice in the same scope is indeed an error - and of exactly the same type as 'strict' is supposed to prevent. Perl may not throw a warning about it as a default behavior, but that does not make it not an error. Is there ever a situation in which declaring a variable twice in the same scope is useful? Conversely, is there ever a time when doing so will not cause problems?
It seems to me that reasonable answers to both of the above questions imply that this should indeed be a feature in "strict" - if not in Perl itself. It would have rather obvious positive effects, and no negative ones that I can think of.
-- I hate storms, but calms undermine my spirits. -- Bernard Moitessier, "The Long Way"
In reply to Re^2: Help! My variables are jumping off a cliff!
by oko1
in thread Help! My variables are jumping off a cliff!
by oko1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |