Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Help to infinite loop

by Corion (Patriarch)
on Jan 10, 2009 at 22:20 UTC ( [id://735439]=note: print w/replies, xml ) Need Help??


in reply to Help to infinite loop

Maybe you want to print a newline?

print "checking website...\n";

Otherwise, I wonder what you expect an infinite loop to do, other than making your program run forever...

Replies are listed 'Best First'.
Re^2: Help to infinite loop
by ikegami (Patriarch) on Jan 10, 2009 at 22:29 UTC

    Explanation for Corion's proposal: Suffering from Buffering

    Perl is happily printing your string into a buffer every minute. Had you waited 3 hours and 35 minutes, you probably would have seen 215 copies of the message appear at once.

Re^2: Help to infinite loop
by Mik0r (Novice) on Jan 10, 2009 at 22:29 UTC
    Yes, I need it to run until stopped, which I have written an input sub function which changes the variable to 0 which should then stop it. but problem still remains that the loop never runs when its called and locks it up
      Surely the question still remains, how do you know ...that the loop never runs... ? By ...it locks up..., I assume you mean the caller, aka the script, which if true, surely implies that the loop is indeed starting and as Corion and ikegami have both already pointed out, you (or more accurately, your script) is 'suffering' from buffering.

      A user level that continues to overstate my experience :-))
      </div

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-19 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found