Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Using exit

by steves (Curate)
on Dec 30, 2004 at 16:34 UTC ( #418301=note: print w/ replies, xml ) Need Help??


in reply to Using exit

exit will cause the process to stop running. To restart it and pick up at another location, you'd have to save some sort of data before exiting that would tell you where to pick up, then load and use that data to conditionally execute code on restart. This doesn't sound like a good design to me. Are you sure you don't want to just sleep for 3 seconds, then continue on?


Comment on Re: Using exit
Re^2: Using exit
by Anonymous Monk on Dec 30, 2004 at 16:41 UTC
    Tried but it doesn't work the way I want cause when I use sleep(3); it doesn't display what I already have processed on the browser it just seats there and of course "sleep" for 3 seconds. and using exit displays everything at that point to the browser, I just need some similar trick to display whatever at some point in my program and than move on.
      if you're trying to get things to display to the browser, there are other things to do:
      $|++;
      to force writes to be "immediate". (i'm forgetting the proper term .. not enough coffee yet this morning ... )

      the reason  exit is sending the output to the browser is because the write buffer is closed, like a  close on a filehandle.

      It sounds like you are developing a CGI application. If this is the case, turning off output buffering may ensure that the output from the script is displayed in the browser:
      $|++;
        Yes I am, and I am using $|++ already, but at some point I would like to have what the exit does but no success yet.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2014-09-21 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (166 votes), past polls