Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by amedico (Sexton)
on Apr 07, 2010 at 04:18 UTC ( [id://833179]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://833179]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-25 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found