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

Re: Clearing an Array of Array's from memory

by tcf22 (Priest)
on Aug 29, 2003 at 16:03 UTC ( #287733=note: print w/replies, xml ) Need Help??


in reply to Clearing an Array of Array's from memory

You could just assign it an empty array
@myarray = ();
or if it is an array ref, then assign it to an empty array ref
$myarray_ref = [];
Cleaning it up will take a little time, but not enough to worry about. Doing this will free up some memory(it won't release memory back to the OS) for perl to reuse.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://287733]
help
Chatterbox?
[ovedpo15]: If I use "unless(opendir(my $dir, $test_dir))" why does it give me error "Global symbol "$dir" requires explicit package name at" if I used "my"? If I use my $dir before the opendir it works.. but why?

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2018-04-22 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?