Earlier quoted context omitted.
This is why wise Perl programmers turn on use strict, and then declare variables with my. Now attempting to dynamically scope stuff is a compilation error. (Except for some built in variables, like $_. Which you don't use in real programs.) This has been standard advice since the last millennium. But you can't change it without breaking backwards compatibility. That said, I do have several good uses for local. But no…
> variables, like $_. Which you don't use in real programs Oh really? What's wrong with $_ and since when it is?
I personally have no issues doing:
foreach @array {
chomp;
print;
}
But as soon as I have to type "$_" I make a real variable.