Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Real Time Update of Browser from Perl Script

Status
Not open for further replies.

riccol

Programmer
Joined
May 22, 2007
Messages
2
Location
US
I have an HTML page on a web host server that calls a Perl Script. I'd like the Perl script to keep updating the browser window with a status countdown message while the script does it's stuff. However, any HTML print statements that the perl script generates don't get printed to the browser window until the Perl script ends. How do I get around this?
 
$|=1;
print stuff here
$|=0;


------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
I tried this and it didn't work. Can you please explain how $|=1; operator functions.
 
I think you still have to end your print statements with a \n before the browser will display it though.. correct?

I normally don't worry about my \n in html except for easy of reading the html (cause they don't really matter) but I was thinking on a few of my longer scripts even with $|=1 it still wouldn't show on the browser till I started adding in \n's.

of course... there's that chance that eating lead paint as a kid has affected my memory :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top