Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

colons and commas?

colons Commas
0
Posted

colons and commas?

0

Normally, a bareword doesn’t need to be quoted, but in most cases probably should be (and must be under “use strict”). But a hash key consisting of a simple word (that isn’t the name of a defined subroutine) and the left-hand operand to the “=>” operator both count as though they were quoted: This is like this ———— ————— $foo{line} $foo{“line”} bar => stuff “bar” => stuff The final semicolon in a block is optional, as is the final comma in a list.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.