Excellent review of scoping, arturo. The only nit that I have with the writeup is that you leave some of the more important results of print results out (for example, in the very last example, what does the last print statement in the main body of the problem put out?). Certainly, one can copy and paste the code into perl and see what comes out, bu it might be better to make sure to include the unmodified output for each little script right after the script, making sure that each printed line can be unambigously traced back into the program.
in reply to Variable Scoping in Perl: the basics
But kudos on covering a difficult subject and getting across the difference between my and local, something I've always had trouble with!
Update: Arturo did the corrections as indicated, so this is most redundant, but this comment should still serve to remind future writers to include all output particularly if it's necessary for program understading :).
Dr. Michael K. Neylon - email@example.com
"You've left the lens cap of your mind on again, Pinky" - The Brain