in reply to using undef on a array

I don't know the subtle differences between the first two (I use them interchangably) but the third one:
@a = undef;
is assigning a one element list to @a.... It's actually doing something like:
@a = (undef);
Which is a relatively common error.

-Blake

Replies are listed 'Best First'.
Re: Re: using undef on a array
by Biker (Priest) on Oct 31, 2001 at 14:41 UTC

    I think that the original problem was "how to clear out an array". (As usual, correct me if I'm wrong.)

    $#my_array=-1;


    f--k the world!!!!
    /dev/world has reached maximal mount count, check forced.