Thread nur Stringkonstanten?
(15 answers)
Opened by lichtkind at 2017-10-02 00:49
jou Raubtier hat es zeitgleich auch geschrieben, steht aber auch in der perldoc:
You can get into trouble if you use constants in a context which automatically quotes barewords (as is true for any subroutine call). For example, you can't say $hash{CONSTANT} because CONSTANT will be interpreted as a string. Use $hash{CONSTANT()} or $hash{+CONSTANT} to prevent the bareword quoting mechanism from kicking in. Similarly, since the => operator quotes a bareword immediately to its left, you have to say CONSTANT() => 'value' (or simply use a comma in place of the big arrow) instead of CONSTANT => 'value' . Last edited: 2017-10-02 20:31:48 +0200 (CEST) Tutorien in der Wiki, mein zeug:
kephra, baumhaus, garten, gezwitscher Es beginnt immer mit einer Entscheidung. |