On Tue, 18 Apr 2000 [EMAIL PROTECTED] wrote:

> On Mon, Apr 17, 2000 at 01:33:08PM -0600, Jason Terry wrote:
> > This is the first i have seen "delete" referenced.  What does it do?  How is it 
>used?
> > 
> > Thank you
> >       -Jason
> 
> It's the stack cleaner... but it only works for scalars, and maybe
> arrays, but its better for arrays and hashes to do the following at
> the bottom of each code block in registry scripts.  (True good note)
> 
> @somearray = ();
> %somehash =();
> delete $somescalar;
> (and don't forget untie :-> )
> 
> Basically it will clean up *most* of the memory taken up by these
> variables.

Ouch - maybe you should read a perl book before trying to re-implement
mod_perl more efficiently ;-)

>From "perldoc -f delete":

=item delete EXPR

Deletes the specified key(s) and their associated values from a hash.
...

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org

Reply via email to