my has a dual nature:
so in your code
Hence you just disabled the initialisation and the old value survives.
Rule of thumb: using my within a conditional branches without own scope is bad style and vulnerable to creating unwanted side effects!
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re: uninitialised variable (my: Run Time vs Compile Time)
by LanX
in thread uninitialised variable
by opaltoot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |