Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Loop and Add more cookies

by Accelerator (Initiate)
on Oct 12, 2015 at 15:42 UTC ( [id://1144550]=note: print w/replies, xml ) Need Help??


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

thanks mate, i made a mistake there the code is

$number = 1; $cookies = ""; while ( $cookies ne "COOKIES"x$number."S " x $number, ) { $number =++$number; print "Cookie monster: I want"." COOKIES"x$number."S" x $number, "! +\n"; chomp($cookies= <STDIN>); } print "Mmmm. $number COOKIES. :-)\n"; exit;

but the task was to find an answer to end the script in the command prompt not to write a script, but i appreciate your help:)

Replies are listed 'Best First'.
Re^3: Loop and Add more cookies
by choroba (Cardinal) on Oct 12, 2015 at 15:48 UTC
    the task was to find an answer to end the script
    D'oh! In the original script, it was COOKIESCOOKIES, in the new one, it's COOKIESCOOKIESS S (including the trailing space). Your code still has some problems I addressed in my previous reply.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      thank you a lot, i am certain that you are very good at this. I didn't write this script, my teacher gave this script and told me to find the answer (what to type into the command prompt to end this script).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found