in reply to inconsistent variable interpolation in here document

Hard to read, hence hard to tell

> Any tips?

 @{[COUNTER_STATE_VAR]}

@{[...]} is executing code, COUNTER_STATE_VAR could be a function with side effects.

Otherwise please provide us with a short reproducible example and a print of the resulting string.

Probably the problem is on the side of the receiver language not Perl.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^2: inconsistent variable interpolation in here document
by richard.sharpe (Sexton) on Nov 28, 2019 at 23:16 UTC

    COUNTER_STATE_VAR is constant defined this way:

    use constant { # ... COUNTER_STATE_VAR => "%counter", # ... };

    Unfortunately, I am unable to reproduce with shorter example. I tried, but the output is consistent, when I am "snippetting" it out of its authentic context. I also cannot provide whole code base, because it contains a lot of information, which cannot be disclosed to third parties. Therefore I am seeking for tips, but the resolution is on me.