Next | Program Repair Shop | 158 |
13 my ($rounds, $round_temp, $squares, $page, $x, $y, $z, $cell, $player_move, @available_choices, $computer_move, @choices, $round, $winner, $player_move_pretty, $computer_move_pretty);
File-Scope my Variables
$squares, $page really are legitimate here
@choices and $cell are not used at all!
But most of these are actually small-scope variables
Useful rule of thumb:
The shorter the name, the smaller the scope
A variable named $x has no business living at file scope
Either fix the scope, or fix the name
Here we will fix the scope
Next | Copyright © 2001 M. J. Dominus |