Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Doubley surprised by fat commas

by parv (Vicar)
on Jun 09, 2021 at 21:57 UTC ( #11133706=note: print w/replies, xml ) Need Help??


in reply to Doubley surprised by fat commas

You are missing that you are dealing with Perl. Recently when experimenting with sub signatures, I relearned that , , in a list flattens to as-if-there-was-no-second-comma while expecting an undef. Like you. (Note to self: empty list is also, effectively, removed in (2, (), 4 ) to give (2, 4).)

perlop mentions "Comma Operator" ("list argument separator" in list context), but does not touch the above.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-12-05 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?