Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: Waiting For Input

by Anonymous Monk
on Mar 04, 2013 at 09:16 UTC ( #1021612=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Waiting For Input
in thread Waiting For Input

The Temp.pl script gives me the last print statement conatined in it . So I know that the Temp.pl ends, But How do i tell this while loop to end? <\p>


Comment on Re^4: Waiting For Input
Re^5: Waiting For Input
by Corion (Pope) on Mar 04, 2013 at 09:18 UTC

    Why did you write that loop in the first place?

    On Windows, you end input to STDIN by entering CTRL+Z on an empty line and pressing enter.

      This is used such that when user presses ENTER the script stops and resume only when ENTER is pressed again

        Maybe you want the user to enter something else to quit the program?

Re^5: Waiting For Input
by ww (Bishop) on Mar 04, 2013 at 12:22 UTC
    You may be correct, but the statement that you see the last print does NOT offer any assurances that Temp.pl actually ends: all you know for sure based on what you've told us is that Temp.pl runs thru the last print statement.

    Is "the last print statement contained in it" the very last code in the script?

    As to your question about how to end the while loop: you haven't shown us the code. Guessing on a fix for unknown code is not worth our time or yours.


    If you didn't program your executable by toggling in binary, it wasn't really programming!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-08-23 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls