in reply to
Re^4: Noob could use advice on simplification & optimization
in thread Noob could use advice on simplification & optimization
'my' variables are lexical to the enclosing block. Here, since the variables are declared in the MAIN package, outside of any block, they are global, or visible to all all blocks within the package MAIN.
Declaring a variable with 'our' makes the the variable lexical to all enclosed blocks even across package boundaries.
See perldoc -f my and perldoc -f our for more explanation.