you mean any sub with empty prototype which is the way how constants are implemented in constant
see https://perldoc.perl.org/perlsub#Constant-Functions °
and the OP's code still compiles even if your return values are not constant.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) NB:
sub FLAG_MASK () { FLAG_FOO | FLAG_BAR } sub FOO_SET () { 1 if FLAG_MASK & FLAG_FOO }
In reply to Re^11: How can I set a bit to 0 ?
by LanX
in thread How can I set a bit to 0 ?
by bartender1382
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |