in reply to Re: How to differentiate an empty array from an unitialized one?
in thread How to differentiate an empty array from an unitialized one?

Iirc Split can return undef depending on regex capture groups
  • Comment on Re^2: How to differentiate an empty array from an unitialized one?

Replies are listed 'Best First'.
Re^3: How to differentiate an empty array from an unitialized one?
by haukex (Archbishop) on Jul 09, 2018 at 08:55 UTC
    Split can return undef depending on regex capture groups

    Yes, that's correct, for example split( /(x)|(y)/, "axbyc" ) yields ("a", "x", undef, "b", undef, "y", "c"). It's also documented at the bottom of split.