I am seeing both of them used in this script I am trying to debug and the literature is just not clear. Can someone demystify this for me?
&s; sub s() { local $s="5"; &b; print $s; } sub b() { $s++; }
The above script prints 6.
But if we change local to my it will print 5.
This is the difference. Simple.