in reply to Re^2: undef a List of Variables
in thread undef a List of Variables

Yes, that works in most other languages. In ruby, arr[0..-1] returns all elements of the array (and is an lvalue too). In python, arr[0:-1] is all but the last element, arr[0:] or arr[:] is all elements. In octave, you don't have negative array indexes, but you have avec(:) for all of the vector, but also no special notation for all the elements starting the n'th (like arr[n:] in python). In mathematica, you have arr[[All]] for all elements of the array, but also no starting slice notation. (These are only a few languages of course.)

Anyway, you can write 0..$#_ or even 0..@_ as the index, or avoid indexing completely and say sub undeff { undef $_ for @_ }.