[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Cleaning out arrays



paladeen@soth.zoneit.com (Sveinbjorn Thordarson) wrote:
>Hell again
>

Hell to you too. =)

>I really to post a lot here...sorry about it, but then again I have a
>lot of questions.   I know this may sound like a really stupid question,
>but I need to clean out an array, as in wipe every single value, and
>pop/shift just aren't doing what I want.  I want the array to be as if
>it had never contained any values...fresh and new. =)  How do I go about
>doing that?

Do this:
@array = ();

You can do undef(@array) if you want to clear the internal memory, but that's
seldom necessary and usually not even a good idea.  See the docs for the
undef() function.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  ken@forum.swarthmore.edu                            The Math Forum



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org