in reply to what is the difference between 'my' and 'local'?

Another very important point is that "my" variables are not accessible via the symbol table. So if you had:
package Foo; my $var = 20;
You could NOT access $var like this:
print $Foo::var;