in reply to Re: Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine
in thread Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine

No, I think the OP is referring to @classes and %classes in the first file, "Classes.pm". In that package, @classes and %classes are being used as global shared state for the various functions. There, @classes and %classes need to be reset before each new call to class_data, or else the data from separate calls will commingle.
  • Comment on Re^2: Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine
  • Download Code

Replies are listed 'Best First'.
Re^3: Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine
by Lady_Aleena (Priest) on Apr 07, 2010 at 04:53 UTC

    amedico, 7stud read correctly, I was trying to undefine @classes in the for loop too. :S

    Have a nice day!
    Lady Aleena