Take a look at perldoc perlsyn (the section on Foreach) for more information but the short answer is yes.
and is there a way to get the behavior I'm looking for, short of using some kind of intermediate variable?
As Roger shows above just change your looping variable, and set $black_player to the value you before you exit the loop.
-enlil
In reply to Re: Question regarding variable scope
by Enlil
in thread Question regarding variable scope
by jpfarmer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |