> -----Original Message-----
> From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 25, 2001 3:07 PM
> To: Beginners (E-mail)
> Subject: clearing memory
> 
> 
> Folks,
> 
> I am drawing a blank here.. I am onsite at a customers 
> location with not perl books and perldoc is not installed :(
> 
> what is the quickest, cleanest , efficient way to clear out 
> memory used by an array and other variables in a script?
> 
> We have a script that is continuously run and sleeps every 30 
> seconds b4 grabbing data and populating arrays. Is it 
> possible to make a clean() that will wipe the slate clean at 
> the end or beginning of the next run?

Well, you can just clear out variables individually with undef and let perl
do its garbage collection:

   undef @myarray;
   undef %myhasn;
   undef $myscalar;

For a truly fresh start, maybe have the script exec() itself?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to