Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Loop and Add more cookies

by choroba (Cardinal)
on Oct 12, 2015 at 20:30 UTC ( [id://1144583]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1144583]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-16 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found