: Since undef is both a function and a value, are the following equivalent?

:

: undef $scalar;

: $scalar = undef;

They're equivalent, though undef is always a function, even when it has

no argument. It's better to think of it this way so that you'll

remember to put undef() when there's any ambiguity about whether there

IS an argument.

: I suppose the answer is more complicated for arrays.

Yes, because undef is a scalar, and when say

You get an array with one (undefined) scalar value in it.

Larry