0
Perl: Bit Operator "<<" is interpreted as #
I have a *.pm-File with the line
$chScale = (1 << TSL2561_LUX_CHSCALE);
Textastic prints everything green below the bit-operator <<
Customer support service by UserEcho
I have a *.pm-File with the line
$chScale = (1 << TSL2561_LUX_CHSCALE);
Textastic prints everything green below the bit-operator <<
Customer support service by UserEcho
Hello,
in Perl, "<<" can start a heredoc string.
While the Perl interpreter can decide if this is indeed a Heredoc string or a shift left operator, a simple language grammar can't, because it doesn't know that TSL2561_LUX_CHSCALE is a constant.
If you save the constant in a variable first and use that to do the binary left shift, it is highlighted correctly: