http://www.perlmonks.org?node_id=68779


in reply to (s)coping with foreach

"lexical" means "pertaining to the text".

lexical variables are so-called because you can figure out their scope just by looking at the program text, with no thought about what it is doing or what order it is executed in or anything else pertaining to the running of the program. All you need to look at is the arrangement of curly braces on the page.

Hope this helps.