Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Split does not behave like a subroutine (prototype / updated)

by haukex (Archbishop)
on Jul 18, 2020 at 18:16 UTC ( [id://11119503]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Split does not behave like a subroutine (prototype / updated)
in thread Split does not behave like a subroutine

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.

Replies are listed 'Best First'.
Re^4: Split does not behave like a subroutine (prototype / updated)
by LanX (Saint) on Jul 18, 2020 at 22:09 UTC
    > 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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119503]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-26 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found