in reply to v5.36 syntax error around given/when

what would be the modern way to write that loop?

Assuming you are actually asking about the given statement rather than the loop which contains it, the answer is in the FAQ.


🦛

Replies are listed 'Best First'.
Re^2: v5.36 syntax error around given/when
by ibm1620 (Hermit) on Jun 09, 2022 at 22:37 UTC
    Thanks. I was actually talking about the while-loop as well, since it contains the declaration of $v that seems to have been ignored.

      The error about the undeclared $v comes after the 2 syntax errors. Once you see a syntax error all bets are off concerning the rest of the compilation. You need to fix the syntax errors first and only then worry about everything else.


      🦛