in reply to use constant usage clarification
Hi perlron,
from the perlop page:The => operator is a synonym for the comma except that it causes a word on its left to be interpreted as a string if it begins with a letter or underscore and is composed only of letters, digits and underscores. This includes operands that might otherwise be interpreted as operators, constants, single number v-strings or function calls. If in doubt about this behavior, the left operand can be quoted explicitly.
So there is no assignment going on (at that point), just a list of values being passed to the pragma. It's the same as this:
use constant 'x', 1/3;The pragma then does the magic of turning each identifier,value pair into a usable constant.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: use constant usage clarification
by perlron (Pilgrim) on Oct 31, 2014 at 06:36 UTC |
In Section
Seekers of Perl Wisdom