SPUG: Too long to find bug: Fat comma and assignment look similar, and have some similar meaning
Devin Ben-Hur
dbenhur at whitepages.com
Fri Jan 15 17:30:19 PST 2010
Ivan Heffner wrote:
> This is a contrived example, but since Perl doesn't actually
> distinguish between fat and skinny comma (or translates the fat commas
> into skinny commas and it is purely human brains that give "special
> meaning" to fat commas)
This is not strictly true.
=> has the syntactic effect of turning a bareword to its left into a string.
$ perl -e 'use constant FOO => 1; print FOO, 2, "\n", FOO => 2, "\n";'
12
FOO2
--
-Devin
More information about the spug-list
mailing list