in reply to Re: Split does not behave like a subroutine
in thread Split does not behave like a subroutine

> Correct, there are a few Perl functions that are exceptions and parsed differently from the rest. As LanX mentioned, they can generally be identified by prototype returning undef.

I think it's unfortunate that undef means ...

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

UPDATE

Am I wrong or is there no difference between

hence both equally and undistinguishable allowing to call func(LIST) ?

  • Comment on Re^2: Split does not behave like a subroutine (prototype / updated)
  • Download Code

Replies are listed 'Best First'.
Re^3: Split does not behave like a subroutine (prototype / updated)
by haukex (Archbishop) on Jul 18, 2020 at 18:16 UTC
    I think it's unfortunate that undef means special parsing for CORE::builtins. / default LIST for other subs

    Yes, I agree, it's unfortunate. However, from a quick check it seems that all Perl builtins that accept a plain list explicitly have a @ prototype (like die, unlink, chown), and only those with special parsing return undef for their prototype.

    Am I wrong or is there no difference between no prototype / prototype (@)

    I think that's true, yes.

      > that accept a plain list explicitly have a @ prototype

      Oh, that's great!

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery