in reply to Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine
LA:
@classes and %classes are declared at the top lex level of the package, so they with not go out of scope until the program exits. When it is appropriate, within a routine in the package, you can:
... @classes = (); %classes = (); ...
to empty them.
Good luck. -c
In Section
Seekers of Perl Wisdom