in reply to What is the scope of $_?
See perldoc -v $_, Tutorials: Variable Scoping in Perl: the basics, Coping with Scoping, Lexical scoping like a fox