Thread nur Stringkonstanten? (15 answers)
Opened by lichtkind at 2017-10-02 00:49

lichtkind
 2017-10-02 15:12
#187464 #187464
User since
2004-03-22
5681 Artikel
ModeratorIn + EditorIn
[Homepage]
user image
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)
Wiki:Tutorien in der Wiki, mein zeug:
kephra, baumhaus, garten, gezwitscher

Es beginnt immer mit einer Entscheidung.

View full thread nur Stringkonstanten?