in reply to Re^2: Loop and Add more cookies
in thread Loop and Add more cookies

After the first input, $ZAHL is 2, because
$ZAHL =++$ZAHL

increases its value. I'm not sure why your teacher showed you this construct, as there are many easier ways how to add one to a variable:

$x++; ++$x; $x += 1; $x = $x + 1;

Therefore, the input is compared to

"KEKSE" x 2 . "E " x 2

i.e.

KEKSEKEKSEE E ~~~~~ ~~ once E + space ~~~~ twice ~~ E + space
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: Loop and Add more cookies
by Accelerator (Initiate) on Oct 12, 2015 at 20:57 UTC
    Thank you so much and i even understand how you got to that point, man you made my day, just glad to finally understand this :*D