in reply to Re^2: Variable scoping problem
in thread Variable scoping problem

Thank you. I replaced "require" with "do" and the program now works.