arrays don't have a concept of "(un)defined"
Yeah, that's an odd design decision which I personally disagree with. I see no logical reason to distinguish between "empty" and "undefined" for scalars, but not for arrays.
In any case, I considered going into that in my previous comment, but obviously decided against it. I probably should have, given that the literal answer to "How to differentiate an empty array from an uninitialized one?" is "You don't, because Perl doesn't."
$ perl -wMstrict -MData::Dump -e 'dd split /-|(x)/, "-", -1'
("", undef, "")
Interesting. I wasn't aware of that behavior in
split. Thanks for pointing it out!