in reply to deleting all the elements of an array

There is more than one way to do it. I like to:
$#table_cont = -1;
This clears the array by setting the number of elements in the array to -1.

Cheers!

Brent

Update: Sometimes you win, sometimes you lose. Today I'm losing. Slow by a minute... Duplicate post.

Replies are listed 'Best First'.
Re (tilly) 2: deleting all the elements of an array
by tilly (Archbishop) on Dec 15, 2001 at 12:23 UTC
    What you said works, but what you said for why it works doesn't. More specifically, what you assign to $#array is off by 1 from how many elements you leave in it.
Re: Re: deleting all the elements of an array
by archen (Pilgrim) on Dec 14, 2001 at 08:45 UTC
    well if it makes you feel any better, I had to try to post 3 times before it finally got accepted. Seems like when you press ctrl+c in Mozilla in a form it randomly sends you back in history, and doesn't let you go foreward...
      You know, that made me smile and laugh a little. So yeah, it did make me feel a little better. ;-)

      Cheers!

      Brent