Hello there, I'm pretty new and we started to learn to use perl, however i got a script and tried to find an answer for three days already and still couldn't figure it out. I tried several approaches but always kept failing. Hope you guys can enlighten me how to get it done :)
$number = 1; $cookies = ""; while ( $cookies ne "COOKIES"x$number."S " x $COOKIES, ) { $number =++$number; print "Cookie monster: I want"." COOKIES"x$number."S" x $number, "! +\n"; chomp($cookies= <STDIN>); } print "Mmmm. $number COOKIES. :-)\n"; exit;
In reply to Loop and Add more cookies by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |