Thread: undef
View Single Post
  #2  
Old 07-29-2009, 04:36 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Unless you were using a TON of variables, I don't think that would effect memory at all. You should really only need to undef them if you need to clear them out for some reason so they don't get used later on. Like, if you have an NPC do something and set a variable and you use that variable for an event or something for a particular player, you might not want that variable to be set the next time that event starts or the next time another player interacts with that NPC. You shouldn't really need to use undef on qglobals as long as you are using $qglobals{qglobalname} in your scripts and not just pulling qglobal information with variables named the same as your qglobal. You can check if a qglobal is not defined by doing a (!defined(qglobals{qglobalname})), and so on.

I am certainly no perl expert, so, I might be wrong, but that is my understanding of the answers to your questions.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote