Don't ask to ask, just ask | |
PerlMonks |
Re: Doubley surprised by fat commasby parv (Parson) |
on Jun 09, 2021 at 21:57 UTC ( [id://11133706]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|